Linux Rhel 6.4 Apache compiler installation and simple configuration process (2)

Source: Internet
Author: User

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)

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.