Manually compile and install Apache with a Linux virtual machine

Manually compile and install Apache Apache website server with Linux virtual machine
: As the front end of the LAMP architecture, it is a powerful and stable web server program. The server directly provides website access to users and sends web pages, pictures and other file contents.
Experimental steps:
1. Download the RPM package of Apache (official website: httpd.apache.org/), put the required package in a folder, and share the folder. Open the virtual machine terminal to log in, enter the smbclient -L command to scan the shared files
Manually compile and install Apache with a Linux virtual machine
Manually compile and install Apache with a Linux virtual machine

2. Create a new folder and mount the required Apache folder to the new folder /www. Enter the ls /www command to view the installation package information in the folder.
Manually compile and install Apache with a Linux virtual machine
3. Switch to the abc folder to decompress the installation package, and place the decompressed folder in the opt directory.
The first installation package ,
Manually compile and install Apache with a Linux virtual machine
the second installation package, and the
Manually compile and install Apache with a Linux virtual machine
third installation package
Manually compile and install Apache with a Linux virtual machine
4. Switch to the opt directory and put The decompressed folder is recursively copied to the apr folder.
Manually compile and install Apache with a Linux virtual machine
5. Install gcc, gcc-c++, and make toolkits in the yum repository. The storage locations of these three packages are in the yum repository, so use the yum repository to install them.
Manually compile and install Apache with a Linux virtual machine
Manually compile and install Apache with a Linux virtual machine
If the make toolkit is already installed, it must not be installed, otherwise it needs to be installed. Enter rpm -q make to see
Manually compile and install Apache with a Linux virtual machine
that the pcre-devel toolkit is in rpm, so install it with rpm
Manually compile and install Apache with a Linux virtual machine
6. Enter 'cd /opt/httpd-2.4.2' to switch to the decompressed folder for configuration file configuration
Manually compile and install Apache with a Linux virtual machine
7. Enter 'make ' command to convert the configuration file into a binary file.
Manually compile and install Apache with a Linux virtual machine
If there is no error (error) at the end, you can proceed to the next step. Enter the 'make install' command to
Manually compile and install Apache with a Linux virtual machine
switch the binary file compilation and installation to /usr/local/apache, and filter out the script files containing # Annotation of the number.
Manually compile and install Apache with a Linux virtual machine
Enter vi /etc/init.d/httpd editing mode, press 'O' to insert a line above to add the beginning of the script, wq save and exit.
Manually compile and install Apache with a Linux virtual machine
Manually compile and install Apache with a Linux virtual machine
8. Set the boot to automatically open 3 (init3 character interface, with network), 5 (init5 graphical interface, with network)
Manually compile and install Apache with a Linux virtual machine
9. Establish soft connections for easy management
Manually compile and install Apache with a Linux virtual machine
10. Edit httpd configuration files
Manually compile and install Apache with a Linux virtual machine
Manually compile and install Apache with a Linux virtual machine
Manually compile and install Apache with a Linux virtual machine

11. Turn on httpd
Manually compile and install Apache with a Linux virtual machine
12. Turn off its firewall, open the web page and enter the IP address of the virtual machine to log in.
Manually compile and install Apache with a Linux virtual machine
Manually compile and install Apache with a Linux virtual machine
connection succeeded

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326315732&siteId=291194637