Install Apache under RHEL 6

Source: Internet
Author: User
Tags apache log

Guide With the popularization of network technology, application and the continuous improvement of Web technology, Web server has become one of the most important network services on the Internet. The original client/server model is gradually being replaced by the browser/server model. Here I will introduce you to the most extensive Web server software Apache installation and operation.

installation of Apache

If installing Rhel 6 o'clock does not choose to install the http-2.2.15-15.e16_2.1.i686 package, you need to copy the appropriate files from the installation CD to the current directory, and then use the following command to install:

# RPM-IVH http-2.2.15-15.e16_2.1.i686.rpm

After successful installation, there are several important files and directories:

    1. /etc/httpd/conf/httpd.conf:apache's master configuration file
    2. /etc/httpd/logs:apache Log Storage Directory
    3. /etc/httpd/modules:apache Module Storage Directory
    4. The/usr/lib/httpd/modules:apache module is also stored in this directory
    5. /usr/sbin/apachectl:apache control scripts for start, stop, and restart operations.
    6. /usr/sbin/httpd:apache Server Process Program Files
    7. /usr/share/doc/httpd-2.2.15:apache Description Document Directory
    8. /var/www:apache provides an example of a website

In addition, the installation disk should also have the Apache Help manual package, named httpd-manual-2.2.15-15.e16_2.1.noarch.rpm, can be installed with the following command:

# RPM-IVH httpd-manual-2.2.15-15.e16_2.1.noarch.rpm

After installation, a Help manual in the form of a Web file appears in the/var/www/manual directory.

Apache's Run

After the RPM package is installed, Apache can work with the example configuration file and enter the following command to start the httpd process:

#/usr/sbin/apachect1 Start

If you want to run Apache automatically when you start up, you can create a Linux boot file that links to a script file named httpd in the/ETC/RC.D/INIT.D directory to see if the httpd process has started:

# Ps-eaf | grep httpd

Then enter the following command to view the Apache listening port:

# Netstat-an | Grep:80tcp    0    0::: +     :::*    LISTEN

You can see that port 80 is already in the listening state. Also to ensure that the client can access the Apache server, enter the following command:

# iptables-i input-p TCP  --dport  -j  ACCEPT

Once the above process is complete, the Apache server can be accessed by the client using a browser, and under normal circumstances, typing 127.0.0.1 on the browser will appear on the Apache test page as shown in:

This article is reproduced from: www.linuxprobe.com/rhel-6-apache/

free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better:http://www.linuxprobe.com/

Install Apache under RHEL 6

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.