우분투, 센토스 등 패키지로 제공되는 아파치는 잘 모르겠으나, 컴파일한 아파치의 경우에는 apachectl 이 chkconfig 로 등록이 안된다. 왜냐하면, chkconfig 는 쉘스크립트 내용안에
# chkconfig: - 85 15
# description: Apache is a World Wide Web server. \
# It is used to serve HTML files and CGI.
# 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:해제
'리눅스 > 어플리케이션' 카테고리의 다른 글
| [Apache] mod_watch backup (0) | 2011/08/20 |
|---|---|
| [MRTG] 자동 설치 스크립트 (0) | 2011/08/16 |
| [작성중] CentOS 5.6 APM Compile (0) | 2011/08/14 |
| [PHP] x86_64 에서 PHP MSSQL 모듈 설치시, libsybdb.a|so 오류 (0) | 2011/01/10 |
| [Apache] 컴파일한 httpd를 chkconfig 로 등록하기. (2) | 2011/01/01 |
| [PHP][작성중] CentOS PHP 컴파일 (3) | 2010/12/24 |

