우분투, 센토스 등 패키지로 제공되는 아파치는 잘 모르겠으나, 컴파일한 아파치의 경우에는 apachectl 이 chkconfig 로 등록이 안된다. 왜냐하면, chkconfig 는 쉘스크립트 내용안에 

# chkconfig: - 85 15
# description: Apache is a World Wide Web server. \
# It is used to serve HTML files and CGI.
같은 내용을 포함하고 있어야 하는데, 기본으로 제공되는 스크립트에는 포함이 안돼있기 때문이다. 
여기까지 설명하면 다들 알아차리겠지만,

엄청쉽다. 
그냥 위에 쓴 저 내용을 apachectl 파일의 #!/bin/sh 다음줄에 추가만 하면 끝이다. 

즉,

Before 
#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0

After 
#!/bin/sh
#
# chkconfig: - 85 15
# description: Apache is a World Wide Web server.  \
#              It is used to serve HTML files and CGI.

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0

그리고 chkconfig 에 등록

[root@test ~]# /sbin/chkconfig --add httpd
[root@test ~]# /sbin/chkconfig --level 2345 httpd on

결과:

[root@rb1 ~]# chkconfig --list | grep httpd
httpd           0:해제 1:해제 2:활성 3:활성 4:활성 5:활성 6:해제

댓글을 달아 주세요

  1. 확분 2011.01.03 03:40  댓글주소  수정/삭제  댓글쓰기

    새해인데 이런 전문지식을..

  2. http://www.moncleroutletespain.com/ 2013.01.05 22:27  댓글주소  수정/삭제  댓글쓰기

    Un des trois cadres dirigeants mis à pied par Renault dans l'affaire d'espionnage industriel qui ébranle le constructeur automobile fran, http://www.moncleroutletespain.com/ moncler outlet?ais est convoqué mardi pour un entretien préalable à un éventuel licenciement, http://www.moncleroutletespain.com/ moncler online, a appris l'AFP samedi soir de sources concordantes, http://www.moncleroutletespain.com/ moncler. Economie Activité perturbée par une grève dans les ports fran, http://www.moncleroutletespain.com/ moncler españa?ais Economie Dioxine: Berlin veut des sanctionsRelated articles:


    http://golf360.tistory.com/68 http://golf360.tistory.com/68

    http://dummy.pe.kr/1656 http://dummy.pe.kr/1656