1: Download the Apache installation package under the GUI, I am under the httpd-2.2.9.tar.gz source installation package, the address is http://httpd.apache.org/download.cgi
2: By: gzip-d httpd-2.2.9.tar.gz
Tar xvf Httpd-2.2.9.tar
Unpack the installation package, and the httpd-2.2.9 folder will appear before you enter the folder.
3: Under the httpd-2.2.9 folder, you can see the Configure folder, at this time with: sudo./configure--prefix=/usr/local/apache--enable-so Set the installation directory and parameter settings. The command so module is used to mention the DSO support for the Apache core module, where Setup starts.
4: Install Apache:sudo make using make and make install
5:/usr/local/apache/bin/apachectl start, this command is used to enable Apache.
Error when performing step fourth:httpd:could not reliably determine the server ' s fully qualified domain name
Solution:
Go to Apache's installation directory:
Linux:/usr/local/apache/conf
sudo gedit httpd.conf
Remove the #servername localhost:80 annotation inside
Re-execute HTTPD
HTTP://LOCALHOST:80 can then be accessed through a browser if the page displays "It works! ", which means that Apache has been installed and started successfully.