- antibiotic 항생제
- Doctors are concerned about the overuse of antibiotics.
- asthma 천식
- The child was suffering from asthma.
- checkup 건강진단
- Yearly general checkups are required for public school students.
- chronic 만성의
- The patient exhibited signs of chronic liver desease.
- combination 결합, 연합
- Vitamin supplements are used in combination with other preventative measures.
- in combination with ~와 더불어, ~와 결합하여
- comprehensive 종합적인, 포괄적인
- a comprehensive physical examination
- conscious 알고 있는, 자각하고 있는
- People taking medication need to be conscious of the risks.
- be conscious of ~을 알고 있다.
- coverage 보상범위, 보도, 취재범위
- Employees may extend their insurance coverage to spouses.
- media coverage of the epidemic
- deprivation 박탈, 상실
- Sleep deprivation weakens the immune system.
- deprive A of B A에게서 B를 빼앗다
- deter 단념시키다, 막다
- Public health advertising may deter unhealthy behaviors.
- diagnosis 진단
- The doctor's diagnosis turned out to be wrong.
- dose 1회 복용량
- For acute pain, the recommended dose is 30 mg once daily.
- duration 지속 기간, 지속
- The duration of the illness may vary from individual to individual.
- eliminate 제거하다
- The kidneys eliminate wastes from the body.
- eradicate 근절하다, 뿌리뽑다
- The World Health Organization resolved to eradicate the disease.
- exposure 노출
- Prolonged exposure to sunlight can cause skin cancer.
- fatigue 피로
- Too much stress can lead to fatigue
- forbid 금지하다
- Absolute Pharmaceuticals Inc. forbids its employees to smoke.
- health 건강, 번영, 안녕
- Brushing after every meal maintains oral health.
- It's difficult to forecast the future health of the insurance industry.
- immune 면역의
- A healthy die strengthens the immune system.
- induce 유발하다.
- Smoking induces health risks such as lung cancer.
- inhalation 흡입
- Several employees suffered from inhalation of toxic fumes
- insurance 보험
- Employees are eligible for dental insurance coverage.
- join ~에 가입하다
- Employees are encouraged to join the health club.
- medicinal 약용의, 치유력이 있는
- a medicinal herb
- nutrition 영양
- Balanced nutrition is essential for growing children.
- periodically 주기적으로
- Free health checkups for all staff members are offered periodically.
- pharmaceutical 제약의, 약학의
- The pharmaceutical company markets children's dietary supplements.
- physician 내과 의사
- Mr. Bently consulted a physician about his high blood pressure.
- premium 보험료
- Monthly premiums will rise next year.
- prescribe 처방하다
- The doctor prescribed a remedy for the cold.
- prevention 예방
- Proper nutrition is necessary for the prevention of illness.
- prolonged 장기의, 오래 끄는
- a prolonged stay in hospital
- reaction 반응
- Some foods can cause allergic reactions in children.
- recommed 추천하다
- The counselor recommended that Phillip stop drinking
- recovery 쾌유, 회복
- Time is needed to make a complete recovery.
- relieve 완화시키다
- AlphaCough effectively relieves the symptoms of winter colds.
- remedy 치료법, 의약
- a good remedy for indigestion
- robust 튼튼한, 건강한
- The 80 year-old still enjoys robust health.
- susceptible ~에 감염되기 쉬운
- A weakened immune system makes one susceptible to colds.
- symptom 증상
- The lawyer exhibited symptoms of a stress disorder
2014년 12월 28일 일요일
TOEIC Vocabulary Day 1
2014년 12월 19일 금요일
NTP 설정 및 NTP 상태 확인
NTP 상태 확인 설명
ROOT# ntpq -p 133.100.9.2
remote refid st t when poll reach delay offset disp
==============================================================================
*GPS_NMEA(1) .GPS. 0 l 184 16 377 0.00 0.002 0.03
+clock.tl.fukuok .GPS. 1 u 218 64 376 3.11 -0.070 0.53
+helio.tl.fukuok .GPS. 1 u 229 64 377 3.60 0.068 0.08
geo.gen.u-ryuky clock.nc.fukuok 2 u 736 1024 376 52.40 7.090 19.15
-ns.hiroshima-u. .GPS. 1 u 213 64 376 17.23 -0.724 2.14
-onikobe.gw.toho .GPS. 1 u 199 512 377 57.82 -1.658 5.16
-izumi.gw.tohoku .GPS. 1 u 359 128 264 60.33 -2.292 3.01
LOCAL(0) LOCAL(0) 3 l 196 64 377 0.00 0.000 10.01
xtime.nist.gov .ACTS. 1 u 336 256 377 189.33 -9.976 2.76
[첫번째 column]
' '(reject) 거리가 멀어서 사용되지 않는 서버
'x'(falsetick) falseticker 검사결과 사용되지 않는 서버
'.'(excess) 참조서버가 많아서 사용되지 않는 서버
'-'(outlyer) clustering 검사결과 사용되지 않는 서버
'+'(candidat) 접속 테스트를 합격하여 언제든지 참조가 가능한 서버
'#'(selected) 동기 거리가 멀지만 참조가 가능한 서버
'*'(sys.peer) 동기중인 서버
'o'(pps.peer) 동기중인 서버(동기는 PPS 신호로 부터 간접적으로 행해짐
[두번째 column 이후 라벨의 의미]
remote Remote Server 의 Host명
refid 참조ID(명확하지 않을 때는 0.0.0.0 으로 표시됨)
st stratum 번호,서버가 어떤 Layer 인지를 표시함.
t 단층(Layer)의 타입 (l:local,u:unicast,m:multicast,b:broadcast)
when 마지막으로 Packet 을 수신한 이후 경과한 시간 (단위:초)
poll Polling 간격 (단위:초)
reach 도달가능한 register 를 8 진수로 표현한 값
delay Polling insterval 지연예상시간 (단위:밀리초)
offset 단층(Layer)의 offset (단위:밀리초)
disp 단층(Layer)의 분산 (단위:밀리초)
추가 NTP에서의 Stratum Layer는 reference colock으로부터의 거리를 말한다.
stratum-0는 GPS 이고 stratum-1은 GPS와 연결된 서버(직결링크) stratum-2는 stratum-1과 네트워크를 통해 연결된 서버이다. stratum layer가 작을수록 reference clock과의 거리가 짧기 때문에 더 정확한 clock을 가진다.
2014년 9월 30일 화요일
pyhton easyInstall, pip, ClientCookie 설치
python용 pkg 관리
easyInstall : https://pypi.python.org/pypi/setuptools#downloads
PIP 설치
easy_install pip
BeautifulSoup 설치
pip install beautifulsoup4
ClientCookie 설치
http://wwwsearch.sourceforge.net/old/ClientCookie/
pip install http://wwwsearch.sourceforge.net/ClientCookie/src/ClientCookie-1.3.0.tar.gz
easyInstall : https://pypi.python.org/pypi/setuptools#downloads
PIP 설치
easy_install pip
BeautifulSoup 설치
pip install beautifulsoup4
ClientCookie 설치
http://wwwsearch.sourceforge.net/old/ClientCookie/
pip install http://wwwsearch.sourceforge.net/ClientCookie/src/ClientCookie-1.3.0.tar.gz
아마존 EC2 서버 Pyhton 2.7로 업그레이드
아마존 EC2 서버의 레드햇 rhel 6.0 버전을 세팅 시
기본 설치된 python 버전은 2.6 버전이다.
최근에는 python 2.7 버전을 대부분 사용하기 때문에 호환성을 위해 업그레이드가 필요하다.
기본적으로 python 2.7.6 버전 다운로드 설치 후 python 링크를 새로 설정한다.
이후 yum이 python으로 구현되어 있기 때문에 이와 관련된 설정값도 수정해야 한다.
cd /opt
wget --no-check-certificate https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --prefix=/usr/local
make && make altinstall
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
sudo /usr/local/bin/python2.7 ez_setup.py
sudo /usr/local/bin/easy_install-2.7 pip
sudo /usr/local/bin/easy_install-2.7 requests
sudo /usr/local/bin/easy_install-2.7 psutil
sudo /usr/local/bin/easy_install-2.7 paramiko
cd /usr/local/bin
mv pip pip2.6
mv easy_install easy_install-2.6
ln -s pip2.7 pip
ln -s easy_install-2.7 easy_install
기본 설치된 python 버전은 2.6 버전이다.
최근에는 python 2.7 버전을 대부분 사용하기 때문에 호환성을 위해 업그레이드가 필요하다.
기본적으로 python 2.7.6 버전 다운로드 설치 후 python 링크를 새로 설정한다.
이후 yum이 python으로 구현되어 있기 때문에 이와 관련된 설정값도 수정해야 한다.
cd /opt
wget --no-check-certificate https://www.python.org/ftp/python/2.7.6/Python-2.7.6.tar.xz
tar xf Python-2.7.6.tar.xz
cd Python-2.7.6
./configure --prefix=/usr/local
make && make altinstall
wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py
sudo /usr/local/bin/python2.7 ez_setup.py
sudo /usr/local/bin/easy_install-2.7 pip
sudo /usr/local/bin/easy_install-2.7 requests
sudo /usr/local/bin/easy_install-2.7 psutil
sudo /usr/local/bin/easy_install-2.7 paramiko
cd /usr/local/bin
mv pip pip2.6
mv easy_install easy_install-2.6
ln -s pip2.7 pip
ln -s easy_install-2.7 easy_install
2014년 9월 17일 수요일
Sencha Touch Build, 센타터치 배포 커맨드
Sencha Touch Build, 센타터치 배포 커맨드
Sencha Touch로 개발한 웹앱을 배포하려면 Sencha CMD 를 사용하면 된다.
프로젝트 내 폴더로 들어가
sencha app build 명령어를 실행하면 된다.
문제는 센차 build 중 아래와 같은 Error가 발생하며 진행이 안 되는 경우가 있다.
/root/bin/Sencha/Cmd/5.0.1.231/extensions/sencha-compass/gems/bin/compass:9:in `require': no such file to load -- rubygems (LoadError)
from /root/bin/Sencha/Cmd/5.0.1.231/extensions/sencha-compass/gems/bin/compass:9
Sencha Touch로 개발한 웹앱을 배포하려면 Sencha CMD 를 사용하면 된다.
프로젝트 내 폴더로 들어가
sencha app build 명령어를 실행하면 된다.
문제는 센차 build 중 아래와 같은 Error가 발생하며 진행이 안 되는 경우가 있다.
/root/bin/Sencha/Cmd/5.0.1.231/extensions/sencha-compass/gems/bin/compass:9:in `require': no such file to load -- rubygems (LoadError)
from /root/bin/Sencha/Cmd/5.0.1.231/extensions/sencha-compass/gems/bin/compass:9
compass, sass가 정상 실행되지 않아 발생한 문제로,
ruby, rubygem을 설치하면 된다.
yum install ruby
yum install rubygems
정상적으로 설치된 이후에는 아래 경로에 결과물이 build 된다.
/프로젝트 폴더/build/production/<Project Name>
2014년 9월 9일 화요일
센차 터치 Sencha Touch 가이드 번역본 문서
센차 터치 Sencha Touch 가이드 번역본 문서
초기에는 이 문서만 정독해도 어느정도 개념을 잡을 수 있을듯하다.
https://play.google.com/books/reader?id=2HKhQzcCklQC&printsec=frontcover&output=reader&authuser=0&hl=ko&pg=GBS.PT19
초기에는 이 문서만 정독해도 어느정도 개념을 잡을 수 있을듯하다.
https://play.google.com/books/reader?id=2HKhQzcCklQC&printsec=frontcover&output=reader&authuser=0&hl=ko&pg=GBS.PT19
Sencha Touch 센차터치 app 내부 파일 구조
Sencha generate 를 이용하여 app을 생성하면 아래와 같은 구조의 directory, file framework로 생성된다.
app- The directory containing the Models, Views, Controllers, and Stores for your app.app.js- The main JavaScript entry point for your app.app.json- The configuration file for your app.index.html- The HTML file for your app.packager.json- The configuration file used by Sencha Cmd for creating native packages for your application.resources- The directory containing the CSS and the images for your app
app.js 파일에는 Sencha Touch의 엔트리 포인트 코드가 들어있다.
app실행 시 main 객체를 생성하고, main view를 생성하는 코드 이다.
객체 지향에서 흔히 사용하는 entry code로 크게 수정할 내용은 없어 보인다 .
아래는 app.js의 샘플 코드이다.
Ext.application({
name: 'Test',
extend: 'Test.Application',
autoCreateViewport: 'Test.view.main.Main'
//-------------------------------------------------------------------------
// Most customizations should be made to Test.Application. If you need to
// customize this file, doing so below this section reduces the likelihood
// of merge conflicts when upgrading to new versions of Sencha Cmd.
//-------------------------------------------------------------------------
});
/app/view/main/Main.js에는 main view 의 UI 코드가 들어있다.
Ext.define('Test.view.main.Main', {
extend: 'Ext.container.Container',
xtype: 'app-main',
controller: 'main',
viewModel: {
type: 'main'
},
layout: {
type: 'border'
},
items: [{
xtype: 'panel',
bind: {
title: '{name}'
},
region: 'west',
html: '<ul><li>This area is commonly used for navigation, for example, using a "tree" component.</li></ul>',
width: 250,
split: true,
tbar: [{
text: 'Button',
handler: 'onClickButton'
}]
},{
region: 'center',
xtype: 'tabpanel',
items:[{
title: 'Tab 1',
html: '<h2>Content appropriate for the current navigation.</h2>'
}]
}]
});
Test.view.main.Main에 대한 클래스는 Ext.define 함수를 사용해서 선언한다.
Ext.define('Test.view.main.Main', { // Ext.define 함수를 사용하여 class선언
extend : 'Ext.container.Container', // Ext.container.Container 를 상속 받는다.
controller: 'main',
viewModel: {
type: 'main'
}
....
});
Sencha Touch App Generate 센차터치 앱 생성
Sencha Touch를 사용하여 app을 생성하기 위해
기본적으로 리눅스 서버 상에 Sencha Touch와 Sencha Touch CMD가 설치되어 있어야 한다.
Sencha Touch 개발 환경 세팅에 대한 자세한 내용은 나중에 ..
Sencha Touch 문서에서는 아래 명령어를 통해 App 디렉토리를 생성하도록 가이드하고있다.
/path/to/touch 는 Sencha touch 관련 파일을 zip파일로 받은 후 압축을 풀어놓은 경로를 말한다.
sencha -sdk /path/to/touch generate app MyApp .
경로를 지정하지 않고 app을 생성하는 방법이 있다.
sencha help generate app 명령어를 실행하여 generate app 관련 문서를 보면 아래와 같다.
sencha generate app -ext MyAppName ./MyAppPath
기본적으로 리눅스 서버 상에 Sencha Touch와 Sencha Touch CMD가 설치되어 있어야 한다.
Sencha Touch 개발 환경 세팅에 대한 자세한 내용은 나중에 ..
Sencha Touch 문서에서는 아래 명령어를 통해 App 디렉토리를 생성하도록 가이드하고있다.
/path/to/touch 는 Sencha touch 관련 파일을 zip파일로 받은 후 압축을 풀어놓은 경로를 말한다.
sencha -sdk /path/to/touch generate app MyApp .
경로를 지정하지 않고 app을 생성하는 방법이 있다.
sencha help generate app 명령어를 실행하여 generate app 관련 문서를 보면 아래와 같다.
This command generates an empty application given a name and target folder.
The application can be extended using other sencha generate commands (e.g.,
sencha generate model).
Other application actions are provided in the sencha app category (e.g.,
sencha app build).
Sencha Cmd can also automatically download and extract a framwork by
specifying the name of the framework as an argument:
sencha generate app -ext MyAppName ./MyAppPath
This will generate an application using the newest version available
for the specified framework.
sencha generate app -ext MyAppName ./MyAppPath
-ext 명령어를 사용하면 외부 링크에서 Sencha Touch framework를 받아 서버에 세팅한다. 외부에서 새로 파일을 받아야 하는 리소스와 시간의 소모가 있지만 Sencha버전을 항상 최신으로 유지 가능하다는 장점이 있다.
2014년 9월 8일 월요일
rhel 7.0 래드햇 리눅스 7 Linux 7 static routing 설정 ip route
static route 스택틱 라우팅은 default gateway로 가면 안 되는 트래픽을 정의할 때 사용한다. 일반적으로 routing은 서버나 클라이언트 단에서 조정하는 것이 아니라, 네트워크 장비 상의 router에서 결정된다. static routing은 특정 트래픽을 의도적으로 특정 위치로 보내야 할때나 VPN tunnel등에서만 사용한다.
default gateway는 목적지 트래픽이 local network 안에 없을 경우 또는 routing table에 preferred 된 트래픽이 없을 경우 사용한다.
일반적으로 default gateway는 장비에 물린 네트워크 라우터의 주소이다.
ip packet이 전송 될 시 1차적으로는 routing table로 static routing이 설정 되어있는지 검사,
2차적으로 설정된 ip address 상의 local network 안 주소인지 검사, 최종적으로 모두 해당하지 않는 패킷의 경우 default gateway로 넘겨버린다.
routing table은 아래 명령어로 확인 가능 하다.
ip route [ add | del | change | append | replace ] destination-address
~]$ ip route
default via 192.168.122.1 dev ens9 proto static metric 1024
192.168.122.0/24 dev ens9 proto kernel scope link src 192.168.122.107
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.126
ip route add 192.0.2.1 via 10.0.0.1 [dev ifname]
192.0.2.1 이라는 ip 의 host(single IP)에 대한 routing table을 추가하는 커맨드이다.
192.0.2.1 이 목적이 주소로 들어올 경유 ifname이라는 interface 의 10.0.0.1을 next-hop로 보내면 된다. ( 목적지 mac-address를 10.0.0.1로 바꿔서 전송한다. 이때 목적지 IP는 변하지 않는다. )
ip route add 192.0.2.0/24 via 10.0.0.1 [dev ifname]
위와 비슷하게 192.0.2.0/24 network 대역에 대한 static routing을 추가할 시 위와 같은 명령어를 실행하면 된다.
이외에도 비슷한 형식으로 del, change, append, replace 명령어를 사용하여 routing table을 편집할 수 있다.
각 interface별 static routing table 정보는 /etc/sysconfig/network-scripts/route-interface 파일 안에 저장된다.
일반적으로 default gateway는 장비에 물린 네트워크 라우터의 주소이다.
ip packet이 전송 될 시 1차적으로는 routing table로 static routing이 설정 되어있는지 검사,
2차적으로 설정된 ip address 상의 local network 안 주소인지 검사, 최종적으로 모두 해당하지 않는 패킷의 경우 default gateway로 넘겨버린다.
routing table은 아래 명령어로 확인 가능 하다.
ip route [ add | del | change | append | replace ] destination-address
~]$ ip route
default via 192.168.122.1 dev ens9 proto static metric 1024
192.168.122.0/24 dev ens9 proto kernel scope link src 192.168.122.107
192.168.122.0/24 dev eth0 proto kernel scope link src 192.168.122.126
ip route add 192.0.2.1 via 10.0.0.1 [dev ifname]
192.0.2.1 이라는 ip 의 host(single IP)에 대한 routing table을 추가하는 커맨드이다.
192.0.2.1 이 목적이 주소로 들어올 경유 ifname이라는 interface 의 10.0.0.1을 next-hop로 보내면 된다. ( 목적지 mac-address를 10.0.0.1로 바꿔서 전송한다. 이때 목적지 IP는 변하지 않는다. )
ip route add 192.0.2.0/24 via 10.0.0.1 [dev ifname]
위와 비슷하게 192.0.2.0/24 network 대역에 대한 static routing을 추가할 시 위와 같은 명령어를 실행하면 된다.
이외에도 비슷한 형식으로 del, change, append, replace 명령어를 사용하여 routing table을 편집할 수 있다.
각 interface별 static routing table 정보는 /etc/sysconfig/network-scripts/route-interface 파일 안에 저장된다.
rhel 7.0 레드햇 리눅스 Linux 7 network static IP 설정하기
rhel 버전에서는 NetworkManager의 interactive tool을 추가로 설치하여 IP를 세팅할 수 있다.
하지만, 역시 기존의 script file 수정 방법이 있기에, 이를 따르는게 편하다.
네트워크 인터페이스 세팅은 ifcfg-<name> 파일에 설정이 저장된다. ex) ifcfg-eth1, ifcfg-bond1
eth0 인터페이스 네트워크 세팅
/etc/sysconfig/network-scripts/ifcfg-eth0 파일
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
NETMASK=255.255.255.0
IPADDR=10.0.1.27
onboot 세팅을 yes로 해줘야 정상 동작한다.
bootproto는 static, dhcp IP 설정을 담당한다.
dhcp로 dynamic 한 주소를 갖는경우 아래와 같이 세팅된다.
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
rhel 7.0 Linux 7.0 리눅스 network 설정 NetworkManager
레드햇 리눅스 7버전에서, 기본 네트워크 서비스는 NetworkManager에 의해 제공된다. NetworkManager은 동적 네트워크 설정과 제어 데몬이다. 전통적인 리눅스 네트워크 설정 ifcfg는 그대로 제공된다.
NetworkManager에서 네트워크 영역, IP 주소, 정적 라우팅, DNS설정, VPN연결 뿐만 아니라 다양한 접속 파라미터를 설정 할 수 있다. 기본적으로 기존에 ifcfg에서 해왔던 동작들이 NetworkManager를 통해 이루어 진다고 생각하면 될 것 같다. rhel 7 버전에서는 NetworkManager의 숙지가 중요하다.
1. NetworkManager 데몬 설치
#yum install NetworkManager
2. NetworkManager 데몬
NetworkManager는 root권한에서 실행된다. systemctl status로 상태를 확인한다.
~]$ systemctl status NetworkManager
NetworkManager.service - Network Manager
Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled)
Active: active (running) since Fri, 08 Mar 2013 12:50:04 +0100; 3 days ago
NetworkManager의 Active 상태가 deactive(dead) 상태일 경우 start명령어를 실행
~]# systemctl start NetworkManager
enable 실행 시 부팅 시마다 해당 데몬이 실행되도록 한다. ( 기존 rhel 6 버전에서의 chkconfig와 같은 역할)
~]# systemctl enable NetworkManager
2014년 9월 6일 토요일
linux 리눅스 vsftpd ftp 설정에서 유저가 home directory 밖의 영역으로 이동하지 못하게 제한 방법
linux 리눅스 vsftpd ftp 설정에서 유저가 home directory 밖의 영역으로 이동하지 못하게 제한 방법
해당 부분은 chmod를 사용하여 linux 계정의 유저 권한 부분을 조정하여 제한하려 했지만 잘 되지 않았다.
home directory 밖의 이동을 제한하기 위해서는 /etc/vsftpd/vsftpd.conf 파일을 직접 수정해야 한다.
----------------------------------------------------------------------------------
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
----------------------------------------------------------------------------------
vsftpd.conf 파일 내 chroot 부분을 수정한다.
chroot_local_user=YES
chroot_list_enable=YES
위의 설정값이 초기에는 # 주석처리 되어있다. chroot 관련 부분을 주석을 모두 해제한다.
chroot_list_file 은 home이외의 영역 조회가 가능한 계정 리스트에 관한 파일이다.
설정 완료 후 /etc/vsftpd/chroot_list 파일을 생성한다. ( home 영역을 벗어날 계정이 없더라도.. )
설정 완료 후 에는 service vsftpd restart로 FTP를 재시작한다.
해당 부분은 chmod를 사용하여 linux 계정의 유저 권한 부분을 조정하여 제한하려 했지만 잘 되지 않았다.
home directory 밖의 이동을 제한하기 위해서는 /etc/vsftpd/vsftpd.conf 파일을 직접 수정해야 한다.
----------------------------------------------------------------------------------
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
chroot_list_file=/etc/vsftpd/chroot_list
----------------------------------------------------------------------------------
vsftpd.conf 파일 내 chroot 부분을 수정한다.
chroot_local_user=YES
chroot_list_enable=YES
위의 설정값이 초기에는 # 주석처리 되어있다. chroot 관련 부분을 주석을 모두 해제한다.
chroot_list_file 은 home이외의 영역 조회가 가능한 계정 리스트에 관한 파일이다.
설정 완료 후 /etc/vsftpd/chroot_list 파일을 생성한다. ( home 영역을 벗어날 계정이 없더라도.. )
설정 완료 후 에는 service vsftpd restart로 FTP를 재시작한다.
linux 리눅스에서 vsftp ftp 계정별 접속 시 home directory 위치 설정
vsftp 를 사용하여 Linux에 FTP서버를 구축한 후 계정별 접속 홈 디렉토리 설정을 하기 위해
별도로 vsftp단에서 해줘야 하는 설정은 없다.
linux 계정 자체의 HOME directory를 원하는 경로로 설정해주면 된다.
웹 호스팅 시 일반적으로 telnet 접속등을 통한 서버 관리는 유저단에서 생각하지 않는 것 같다.
원하는 home 경로는 일반적으로 웹 서버 주소인 /var/www/html 내의 directory를 설정하면 된다.
홈 디렉토리를 변경하는 방법은 2가지 방법이 있다.
1. /etc/passwd 파일을 직접 수정하는 방법
2. usermod 명령어를 사용하는 방법
1. /etc/passwd 파일 수정
hyun:x:501:501::/var/www/html/hyun:/bin/bash
위 계정 설정 값에서 </var/www/html/hyun> 부분은 기존에 /home/hyun이 있던 부분이었다.
해당 위치의 경로를 설정하면 된다.
2. usermod 명령어를 사용하는 방법
usermod -d <변경할 home 경로> <변경할 계정 이름>
ex) usermod -d /var/www/html/hyun hyun
으로 설정하면 된다.
별도로 vsftp단에서 해줘야 하는 설정은 없다.
linux 계정 자체의 HOME directory를 원하는 경로로 설정해주면 된다.
웹 호스팅 시 일반적으로 telnet 접속등을 통한 서버 관리는 유저단에서 생각하지 않는 것 같다.
원하는 home 경로는 일반적으로 웹 서버 주소인 /var/www/html 내의 directory를 설정하면 된다.
홈 디렉토리를 변경하는 방법은 2가지 방법이 있다.
1. /etc/passwd 파일을 직접 수정하는 방법
2. usermod 명령어를 사용하는 방법
1. /etc/passwd 파일 수정
hyun:x:501:501::/var/www/html/hyun:/bin/bash
위 계정 설정 값에서 </var/www/html/hyun> 부분은 기존에 /home/hyun이 있던 부분이었다.
해당 위치의 경로를 설정하면 된다.
2. usermod 명령어를 사용하는 방법
usermod -d <변경할 home 경로> <변경할 계정 이름>
ex) usermod -d /var/www/html/hyun hyun
으로 설정하면 된다.
2014년 9월 4일 목요일
rhel7 Linux 7 FTP vftpd 설명 및 구현 설정
FTP(File Transfer Protocol)는 가장 오래되면서 가장 공통으로 사용되고 있는 프로토콜이다.
FTP는 외부에서 컴퓨터간 신뢰성 있는 파일전송을 지원한다.
Linux에서 가장 대표적으로 사용되는 FTP는 vsftpd 데몬이다.
rhel 7.0에서도 이전 버전과 마찬가지로 vsftpd를 사용한다.
FTP는 TCP 프로코톨 위에서 동작한다. TCP는 오래된 프로토콜로 암호화되지 않기 때문에 보안성은 취약하다.
FTP는 멀티 네트워크 포트를 사용한다. 이는 초기에 21번 포트를 사용해서 서버를 연다. 일반적으로 알려진 FTP포트가 21번이다.
서버로부터의 데이타는 별도의 data 포트를 통해 클라이언트로 전달된다. 이 포트의 번호는 passive mode, active mode에 따라 달라진다.
Active mode vs Passive mode
Active mode
Active 모드에서 클라이언트는 21번 포트를 사용해 서버와의 연결을 초기화 한 후 클라이언트에서 data용으로 사용할 port를 서버에 전달한다.
이후 서버의 20번 포트는 클라이언트에서 받은 data 포트로 데이터를 전달하고, 전달 완료 후 클라이언트는 ack로 서버의 20번 포트에 응답한다.
클라이언트에서 방화벽 등으로 port가 막혀있을 시 서버에서 클라이언트 port로 파일을 전달하지 못한다.
-> Command 포트는 클라이언트 -> 서버로 접속, Data 포트는 서버 -> 클라이언트로 접속하는 형태
Passive mode
Passive mode는 Active 모드와 같이 초기 21번 포트를 사용하여 클라이언트 -> 서버로 접속한 후 서버에서 data용으로 사용할 포트 번호를 전달 받는다.
클라이언트는 이후 전달 받은 data 포트로 2차 접속을 시도한다.
Passive mode에서는 클라이언트로의 접속 문제를 해결했다. 하지만 서버의 1024~65535 포트를 방화벽에서 다 열어야 하는 문제점이 있었다.( 서버의 data용 port 후보군)
아래는 Redhat 공식 문서의 active vs passive 비교 설명
active mode
Active mode is the original method used by the FTP protocol for transferring data to the client application. When an active-mode data transfer is initiated by the FTP client, the server opens a connection from port 20 on the server to the IP address and a random, unprivileged port (greater than 1024) specified by the client. This arrangement means that the client machine must be allowed to accept connections over any port above 1024. With the growth of insecure networks, such as the Internet, the use of firewalls for protecting client machines is now prevalent. Because these client-side firewalls often deny incoming connections from active-mode FTP servers, passive mode was devised.
passive mode
Passive mode, like active mode, is initiated by the FTP client application. When requesting data from the server, the FTP client indicates it wants to access the data in passive mode and the server provides the IP address and a random, unprivileged port (greater than 1024) on the server. The client then connects to that port on the server to download the requested information.
While passive mode does resolve issues for client-side firewall interference with data connections, it can complicate administration of the server-side firewall. You can reduce the number of open ports on a server by limiting the range of unprivileged ports on the FTP server. This also simplifies the process of configuring firewall rules for the server.
FTP는 외부에서 컴퓨터간 신뢰성 있는 파일전송을 지원한다.
Linux에서 가장 대표적으로 사용되는 FTP는 vsftpd 데몬이다.
rhel 7.0에서도 이전 버전과 마찬가지로 vsftpd를 사용한다.
FTP는 TCP 프로코톨 위에서 동작한다. TCP는 오래된 프로토콜로 암호화되지 않기 때문에 보안성은 취약하다.
FTP는 멀티 네트워크 포트를 사용한다. 이는 초기에 21번 포트를 사용해서 서버를 연다. 일반적으로 알려진 FTP포트가 21번이다.
서버로부터의 데이타는 별도의 data 포트를 통해 클라이언트로 전달된다. 이 포트의 번호는 passive mode, active mode에 따라 달라진다.
Active mode vs Passive mode
Active mode
Active 모드에서 클라이언트는 21번 포트를 사용해 서버와의 연결을 초기화 한 후 클라이언트에서 data용으로 사용할 port를 서버에 전달한다.
이후 서버의 20번 포트는 클라이언트에서 받은 data 포트로 데이터를 전달하고, 전달 완료 후 클라이언트는 ack로 서버의 20번 포트에 응답한다.
클라이언트에서 방화벽 등으로 port가 막혀있을 시 서버에서 클라이언트 port로 파일을 전달하지 못한다.
-> Command 포트는 클라이언트 -> 서버로 접속, Data 포트는 서버 -> 클라이언트로 접속하는 형태
Passive mode
Passive mode는 Active 모드와 같이 초기 21번 포트를 사용하여 클라이언트 -> 서버로 접속한 후 서버에서 data용으로 사용할 포트 번호를 전달 받는다.
클라이언트는 이후 전달 받은 data 포트로 2차 접속을 시도한다.
Passive mode에서는 클라이언트로의 접속 문제를 해결했다. 하지만 서버의 1024~65535 포트를 방화벽에서 다 열어야 하는 문제점이 있었다.( 서버의 data용 port 후보군)
아래는 Redhat 공식 문서의 active vs passive 비교 설명
active mode
Active mode is the original method used by the FTP protocol for transferring data to the client application. When an active-mode data transfer is initiated by the FTP client, the server opens a connection from port 20 on the server to the IP address and a random, unprivileged port (greater than 1024) specified by the client. This arrangement means that the client machine must be allowed to accept connections over any port above 1024. With the growth of insecure networks, such as the Internet, the use of firewalls for protecting client machines is now prevalent. Because these client-side firewalls often deny incoming connections from active-mode FTP servers, passive mode was devised.
passive mode
Passive mode, like active mode, is initiated by the FTP client application. When requesting data from the server, the FTP client indicates it wants to access the data in passive mode and the server provides the IP address and a random, unprivileged port (greater than 1024) on the server. The client then connects to that port on the server to download the requested information.
While passive mode does resolve issues for client-side firewall interference with data connections, it can complicate administration of the server-side firewall. You can reduce the number of open ports on a server by limiting the range of unprivileged ports on the FTP server. This also simplifies the process of configuring firewall rules for the server.
rhel 7 레드햇 리눅스 7.0 NFS 네트워크 파일 시스템
리눅스 7.0 버전 부터는 NFSv4.1이 추가되었다. NFSv4.1에서는 보안강화, 클라이언트 pNFS가 추가 되었다.
NFSv4.1에서는 콜백을 위한 TCP 연결 분할을 필요로 하지 않는다.
Red Hat 리눅스 7.0 버전에서는 default로 NFSv4.0을 지원하며, 마운트가 정상 실행되지 않을 시 NFSv3으로 fall back한다.
모든 버전의 NFS는 TCP 프로토콜을 사용한다. NFSv3의 경우 UDP를 사용하기도 한다.
NFS는 TCP port 2049를 사용한다. NFS의 정상 동작의 위해서 iptables(방화벽) 설정을 미리 해야한다.
NFS는 RPC 통신을 통해 서버와 클라이언트 간 통신을 진행한다. 리눅스 7.0 에서는 rpcbind로 이를 관리한다. 이전 버전에서는 portmap으로 관리함
NFS 마운트는 기존와 같다
mount -t nfs -o [options] host:/remote/export /local/directory
/etc/fstab에는 아래와 같이 등록한다
server:/usr/local/pub /pub nfs defaults 0 0
rhel 7 레드햇 리눅스 7.0 btrfs BTRFS 파일 시스템 생성
BTRFS 는 차세대 리눅스 파일 시스템이다.
관리, 신뢰성, 확장성 측면에서 기존의 파일 시스템보다 개선된 특징을 가진다 .
btrfs 시스템은 mkfs.btrfs 커맨드를 통해 실행한다.
# mkfs.btrfs /dev/device
mkfs 커맨드를 통해 해당 파일 시스템을 생성한 이후에 기존 파일 시스템과 같이 mount 커맨드로 마운트 시킨다.
# mount /dev/device /mount-point
btrfs 파일 시스템 용량 늘리기
# btrfs filesystem resize amount /mount-point
The amount can be a set size, such as "+2g" for an increase in 2 GiB, or it can be "max" to grow the file system to fill the whole block device. ( +2g, +2G 와 같이 대소문자 구별을 하지 않는다. )
btrfs 파일 시스템 용량 줄이기
# btrfs filesystem resize amount /mount-point
Set the amount to the required size to shrink by, such as "-2g" for a decrease of 2 GiB.
btrfs 파일 시스템의 크기를 +, - 뿐만 아니라 특정 크길 지정할 수도 있다.
#btrfs filesystem resize amount /mount-point
Set the amount to the required size of the file system, such as "20g" to make the file system 20 GiB.
amount 값 지정에 따라 확장, 축소, 용량 지정이 설정된다.
rhel 7 레드햇 리눅스 7.0 /proc/ 가상 파일 시스템 공간 /PROC VIRTUAL FILE SYSTEM
대부분의 파일 시스템과는 다르게, /proc 폴더는 텍스트, 바이너리 파일을 저장하지 않는다. 대신에 해당 폴더에는 가상 virtual 파일들을 보관한다. 그래서 /proc 는 일반적으로 가상 파일 시스템으로 언급된다. 이러한 가상 파일들은 매우 큰 데이터라 하더라도 0 bytes의 크기를 가진다.
/proc 디렉토리는 저장용으로 사용되지 않는다. 이 폴더의 주된 목적은 하드웨어, 메모리, 실행중 프로세스 등에 파일 기반 인터페이스를 제공해주기 위함이다. 실시간 정보는 검색된다 많은 시스템들에 의해 검색될 수 있다. 그 중 의 일부는 커널의 실행을 위해서 실행될 수 있다.
/proc 파일들은 시스템 스토리지는 관리하고 모니터링 하는데 사용된다.
/proc/devices
- Displays various character and block devices that are currently configured.
- /proc/filesystems
- Lists all file system types currently supported by the kernel.
- /proc/mdstat
- Contains current information on multiple-disk or RAID configurations on the system, if they exist.
- /proc/mounts
- Lists all mounts currently used by the system.
- /proc/partitions
- Contains partition block allocation information.
For more information about the
/proc file system, refer to the Red Hat Enterprise Linux 7 Deployment Guide. rhel 7 레드햇 리눅스 7.0 Redhat에서만 사용되는 특수 filesystem 경로 location
레드햇에만 특별히 사용되는 경로
- /var/lib/rpm : 대부분의 rpm 파일들이 존재하는 공간
- /var/cache/yum : Package Updater를 위해 사용된다.
- /etc/sysconfig/ : 다양한 시스템 설정값을 저장하는 공간, 부팅 시 해당 폴더 내에 있는 스크립트들이 다수 실행된다.
/etc/sysconfig/ 폴더는 관리 시 매우 중요하다.
rhel 7 레드햇 리눅스 7.0 파일 시스템 관리 File System Structure and Maintenance
df command는 현재 사용중인 파일 시스템의 사용율을 출력한다.
df 커맨드의 default 용량 단위는 block이며, 관리자가 보기 편하게 하기 위해서는 df -h 옵션으로 출력하는 것을 권장한다.
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
12G 6.0G 4.6G 57% / /dev/sda1
99M 9.1M 85M 10% /boot
none 316M 0 316M 0% /dev/shm
위의 출력 값에서 /dev/shm 영역은 시스템의 가상 메모리 파일 시스템을 의미한다. (swap 영역인가?)
du 명령어는 현재 sub directory 안 공간 사용량을 출력한다. 위와 마찬가지로 human-readable format으로 변환을 위해 -hs 옵션
du -hs 을 사용한다.
GUI 환경의 경우 gnome-system-monitor의 Filesystem 탭을 참고하면 된다.
Directory 설명
- /boot/ Directory는 부팅에 필요한 정적 파일을 보관한다. 예를 들어 리눅스 커널에 boot 폴더 안에 위치한다. 이 파일들은 부팅 하기 위해 필수이다. 절대로 삭제하거나 수정하면 안 된다.
- /dev/ 디렉토리는 시스템에 연결되 device에 대한 노드를 보관한다. udevd 데몬에 의해 관리된다.
/dev/ 폴더 안 디바에스 네이밍
| File | Description |
|---|---|
| /dev/hda | The master device on the primary IDE channel. |
| /dev/hdb | The slave device on the primary IDE channel. |
| /dev/tty0 | The first virtual console. |
| /dev/tty1 | The second virtual console. |
| /dev/sda | The first device on the primary SCSI or SATA channel. |
| /dev/lp0 | The first parallel port. |
A mapped device
VG 볼륨 그룹 안 논리적 볼륨들은 /dev/mapper/ 폴더 안에 기록된다.
A logical volume in a volume group, for example,
A logical volume in a volume group, for example,
/dev/mapper/VolGroup00-LogVol02.
A traditional storage volume, for example,
/dev/sdbX, where sdb is a storage device name and X is the partition number./dev/sdbX can also be /dev/disk/by-id/WWID, (see Section 26.3.1, “WWID” for more information) or /dev/disk/by-uuid/UUID, (see Section 26.3.2, “UUID and Other Persistent Identifiers” for more information).
- /etc/ 디렉토리에는 시스템 설정 값을 저장한다.
- /media/ 디렉토리는 이동식 저장매체(usb, dvd, cd-rom)에 대한 마운트 포인트로 사용된다.
- /mnt/ 디렉토리는 NFS와 같은 임시 파일 시스템을 위해 사용된다. 이동식 미디어의 마운트는 /media/에 해라. 자동적으로 /media/에 된다.
- /opt/ 디렉토리는 소프트웨어나 add-on 패키지를 위해 사용된다.
- /sys/ 디렉토리는 가상 파일 시스템에 사용됨
- /usr/ 디렉토리는 유저간 공유 가능한 영역 이다.
- /var/ 디렉토리에는 다양한 데이터들이 존재한다. spool directories, logging data, trasient , temp file
system message나 lastlog 는 /var/log파일 안에 있다.
피드 구독하기:
글 (Atom)
