Environment: 1. apache2.2.9, installed under usrlocalapahce2. 2. RedHatenterpriselinux5 Step 1: cpusrlocalapachebinapachectletcrc. dinit. if another version of Apache exists in dhttpd, you can directly overwrite Step 2: Open the httpd file in the editor and
Environment:
1. install apache 2.2.9 in/usr/local/apahce2
2. REdHat enterprise linux 5
Step 1:
Cp/Usr/local/apache/bin/Apachectl/Etc/rc. d/init. d/Httpd// If another version of Apache exists, it can be overwritten directly.
Step 2:
Open the httpd file in the editor and go to the first line #! Add the following two lines of text under/bin/sh:
#Chkconfig: 35 70 30
# Description: Apache
Register the service
Chkconfig? ADdHttpd
Everything is okay. Start the service.
Service httpd start
The first three numbers in the second row indicate that apache is started under runtime Level 3 and 5, and the second and third indicate the priority configuration of startup and stop, which is irrelevant.