원본 링크
리눅스에서 부팅 시 초기화할 서비스의 on/off를 어떻게 하는지 알아보던 중 알게된 굉장한 링크.
Redhat에서는 chkconfig 를 이용하며, 다음과 같이 사용한다.
[출처는 위에 기재]
How to enable a service
As an example, lets enable the Apache web server to start in run levels 2, 3, and 5. This is how it is done.
We first add the service using
chkconfig
script. Then turn on the service at the desired run levels.# chkconfig httpd --add # chkconfig httpd on --level 2,3,5
This will enable the Apache web server to automatically start in the run levels 2, 3 and 5. You can check this by running the command -
# chkconfig --list httpd
How to disable a service
# chkconfig httpd off # chkconfig httpd --del
Red Hat/Fedora also have a useful script called
service
which can be used to start or stop any service. For example, to start Apache web server using the service
script, the command is as follows -# service httpd start
and to stop the service...
# service httpd stop
The options being start, stop and restart which are self explanatory.
댓글 없음:
댓글 쓰기