Install Apache in Linux
1. Go to www.apache.comto download apache. here I will download httpd-2.2.3.tar.gz
2. Copy the compressed file to the installation directory. I will put it under/usr/local /.
3. Unzip this file tar xzvf httpd-2.2.3.tar.gz To Get A httpd-2.2.3 File
4. Then open the file CD httpd-2.2.3
5. Perform the configuration before installing the software. This is almost the operation required to install the software.
./Configure -- prefix =/usr/local/Apache -- enable-CGI -- enable-so -- enable-Rewrite = shared -- enable-speling = shared
/Usr/local/Apache is the directory to be installed,
6. Compile and execute the make command.
7. then install and execute the command make install
Then run apachectl start under/usr/local/Apache/bin.
8. test whether the installation is successful.
Enter the IP address of the machine you want to install on the web page.
It works!
The installation is successful. If you cannot see it, it will fail.
The configuration file is not configured.
9. Go to/etc/init. d/to view the httpd File
10. Change the two rows to the following:
Apachectl =/usr/local/httpd/apachectl //
Httpd =$ {httpd-/usr/local/httpd/bin/httpd} // In the installation directory
This is not the case in the past. Here is the result after I changed it. Find this place and change it, save it, restart the server, and then start the startup method in front of the service. or directly go to/etc/init. d/run httpd start. okay. Check whether the installation is successful.