ntsysv는 런레벨(runlevel)에 등록된 서비스 데몬을 관리하는 것이다.
아래는 아파치 웹서버를 ntsysv에 등록하는 방법이다.
실행 스크립트 복사
cp /usr/local/apache/bin/apachectl /etc/init.d/httpd
권한 부여
chmod 755 /etc/init.d/httpd
아래처럼 etc/init.d/httpd을 작성하기 위해서 vi 에디터를 이용한다.
#vi /etc/init.d/httpd
아래 내용을 써준다.
!/bin/sh chkconfig: 2345 90 90 description: init file for Apache server daemon processname: /usr/local/apache2/bin/apachectl config: /usr/local/apache2/conf/httpd.conf pidfile: /usr/local/apache2/logs/httpd.pid
ntsysv에 등록
chkconfig --add httpd
새댓글 등록