Well, today I’ll show you how to install the Apache 2 web server. So, let’s go!
Note: When I performed the installation, the latest version of the package was “2.2.19″. So the tutorial will cover that version. However, you’ll download the most recent version, so your file will probably have a different name.

First download the latest package containing the Apache source code, in “tar.gz” format, from:
http://httpd.apache.org/download.cgi
Then go to the directory where you downloaded the file and extract it into the "/opt” directory:
| |
Now enter the directory where the source files were extracted:
| |
Run the following command:
| |
Next:
| |
Congratulations, your apache web server is now installed, and we’ll check whether it’s working correctly. To do this, we need to start it and try accessing it using a web browser (e.g.: Mozilla Firefox).
Enter the directory where you installed apache. If you didn’t change the installation path, run the following command:
| |
Otherwise, run the following command:
| |
Start apache by running the following command:
| |
Now open your preferred browser, requesting the following address: http://localhost.
If everything is right, the following message will appear:
# It works!