Apache httpd2.4.18 installation tutorial
Install several other software before installing apache httpd2.4.18, which arePcre, apr, apr-util.
The three software are:
PC: https://sourceforge.net/projects/pcre/files/pcre/8.38/
Apr and apr-util: http://mirrors.cnnic.cn/apache/httpd/
I do not know the need to install the above software, so I suffered a lot during the installation process (I am ashamed), and now I will write out the twists and turns of the installation process, I hope to help everyone.
1. Download the apache httpd-2.4.18 installation package
Use the wget command to download the installation package from the network:
Decompress the package: tar-jxvf httpd-2.4.18.tar.bz2
Ii. Set the installation environment
Go to the httpd-2.4.18 directory:
Run the following command:
Here, '/opt/httpd-2.4.18' is the specified installation directory.
1. Compatibility Question 1:
Solution: Install APR. The download URL starts with the source code. The installation process is not described in detail.
2. Compatibility Question 2:
Solution: Install APR-util. The download URL starts with the source code. The installation process is not described in detail.
3. compatibility issue 3:
Solution: Install pcre. Download the URL and start with it. Use the source code for installation. The installation process is not described in detail.
If the above problem does not occur, execute again
Iii. Compilation
Execute the command: make
Iv. Installation
Run the command: make install
5. Start the httpd service
Run/opt/httpd-2.4.18/bin/apachectl-k start
Here:/opt/httpd-2.4.18 is the installation directory I specified.
The error is displayed because ServerName is not modified.
Go to the httpd. conf file and modify ServerName, as shown in:
Save the file after modification. Start again
As shown in the following figure after successful startup.
Vi. Test
Enter the IP address of the local machine in the browser. The IP address of my host is 10.0.2.15. Therefore, enter 10.0.2.15 in the browser. The result is as follows:
It indicates that the server has been installed successfully !!!
VII. Summary
1. Read the README file before installing the file to understand the dependencies between the software and other precautions to avoid installation failures;
2. apr-util depends on apr. Therefore, you must first install apr.