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:
- /etc/httpd/conf/httpd.conf:apache's master configuration file
- /etc/httpd/logs:apache Log Storage Directory
- /etc/httpd/modules:apache Module Storage Directory
- The/usr/lib/httpd/modules:apache module is also stored in this directory
- /usr/sbin/apachectl:apache control scripts for start, stop, and restart operations.
- /usr/sbin/httpd:apache Server Process Program Files
- /usr/share/doc/httpd-2.2.15:apache Description Document Directory
- /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