Linux Rhel 6.4 Apache compiler installation and simple configuration process (2)
Note: The following extracts are the commands executed during the installation process, and command feedback is not posted to replace with "...". Watch as you look at the directory where the command is executed.
Soft-connect Apache's section execution program to/usr/local/bin (executable commands are placed into $path contained paths for easy execution of Apache commands)
[Email protected] init.d]# ln-s/usr/local/apache/bin/*/usr/local/bin
Add httpd to Chkconfig
The service's management commands are all under/ETC/INIT.D.
[[email protected] init.d]# cp/usr/local/apache/bin/apachectl/etc/init.d/http (Apache autostart script )
Fixed headers for service scripts
[Email protected] init.d]# vim httpd
Add the following two lines below the #!/bin/sh
#chkconfig: 2345 85 15
#description: Apache is a World Wide Web server.
Adding httpd to the service's manager
[Email protected] init.d]# chkconfig--add httpd
View the startup results
[Email protected] init.d]# chkconfig--list httpd
httpd 0:off 1:off 2:on 3:on 4:on 5:on 6:off
Modify the hostname in the configuration file (you can not change it)
[Email protected] init.d]# vi/usr/local/apache/conf/httpd.conf
Locate the ServerName line and remove the # comment, then add the hostname: 80 or ip:80
ServerName 192.168.1.100:80
In order to facilitate the next compilation can make a soft connection to httpd.conf
[Email protected] init.d]# ln-s/usr/local/apache/conf/httpd.conf/etc/htppd.conf
Start httpd after modification is complete
[[Email protected] init.d]# service httpd start
[Email protected] init.d]#
No prompt after startup, let's check
[[Email Protected]manyu init.d]# NETSTAT-ANPT | grep httpd
TCP 0 0::: +:::* LISTEN 30387/httpd
The simple configuration after installing Apache is complete.
This article is from the "Full Fish" blog, please be sure to keep this source http://chengmanyu.blog.51cto.com/7198694/1911111
Linux Rhel 6.4 Apache compiler installation and simple configuration process (2)