Self-starting problems after installing apache in Linux
Source: Internet
Author: User
In Linux, apache is automatically started after installation-Linux Enterprise Application-Linux server application information. The following is a detailed description. Apache2 downloaded from the apache Homepage
Install On redhat9,
Normal./configure
Make
Make install
Modify files such as httpd. conf.
However, it is not automatically started.
Search everywhere and finally solve the problem. The solutions are listed as follows:
1. Copy/usr/local/apache2/bin/apachectl to/etc/rc. d/init. d/httpd.
2. Then, change the name at the beginning of the httpd annotation
#! /Bin/sh
# Chkconfig 35 70 30
# Description apache
Save!
3,/sbin/chkconfig httpd reset
You can.
Briefly explain the functions of the above three steps, so that you may not forget them in the future.
1. Test the script file to/etc/rc. d/init. d/httpd, used as the Service Startup Script,/etc/rc. d/init. d/The scripts in this folder are all services at startup.
See http://linux.vbird.org/linux_basic/0560daemons.php for details
2 # chkconfig 35 70 30
# Description apache
The role of these two statements is to let chkconfig recognize the nature of the script Service
The first number 35 indicates that the instance is started at runtime Level 3 and 5. If the instance is started at runtime level 4, the instance is started at runtime level 345, and so on.
The second number indicates the startup priority.
The third one is not clear. It seems that it is the priority of kill ..
In addition, in the/etc/rc. d/rc5.d/folder, you can see the running-level service 5.
S70httpd indicates that httpd is started at the 5 level with a priority of 70.
3. After this step, you can see httpd in chkconfig.
You can also use,/sbin/chkconfig -- add httpd
The next time you start httpd, you can start it (if you want to start it immediately, use/sbin/service httpd start)
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service