캠핑과 개발

Fedora 16에서는 서비스(Service) 관리를 systemctl이라는 명령어로 한다. (이전 버전 명령어들도 아직은 사용 가능하지만 systemctl 사용을 권장하고 있다.)


서비스 상태 확인 하기

서비스 상태 확인은 다음과 같이 한다.

systemctl status service_name.service

예를 들어 httpd의 상태를 확인하려면 다음과 같이 명령한다.

systemctl status httpd.service


서비스 시작, 중지, 재시작 하기

서비스를 시작하는 기본 명령 방식은 다음과 같다.

systemctl start service_name.service

중지할 때에는 start 대신 stop을, 재시작할 때에는 restart를 쓰면 된다. 예를 들어 httpd를 시작하려면 다음과 같이 명령한다.

systemctl start httpd.service


중지와 재시작은 다음과 같이 명령하면 된다.

systemctl stop httpd.service
systemctl restart httpd.service
systemctl start httpd.service
systemctl start vsftpd@vsftpd.service


부팅 시 자동 실행 하기

시스템 부팅 시 서비스가 자동 실행되게 하는 명령은 다음과 같다.

systemctl enable service_name.service

예를 들어 httpd를 부팅 시 자동 실행되게 하려면 다음과 같이 명령한다.

systemctl enable httpd.service

자동 실행 되지 않게 하려면 enable 대신 disable을 쓰면 된다.


실행 중인 서비스 보기

실행 중인 모든 서비스 목록을 보려면 다음과 같이 명령한다.

systemctl list-units --type=service


'DEVELOPMENT > Linux' 카테고리의 다른 글

linux 명령어 - crontab  (0) 2012.05.17
linux shell 스크립트  (0) 2012.01.13
linux mysql 바이너리 버전 설치  (0) 2011.11.29
ssh 접속 설정.  (0) 2011.11.29
linux 방화벽 열기  (0) 2011.11.29