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
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.
3. Switch to the abc folder to decompress the installation package, and place the decompressed folder in the opt directory.
The first installation package ,
the second installation package, and the
third installation package
4. Switch to the opt directory and put The decompressed folder is recursively copied to the apr folder.
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.
If the make toolkit is already installed, it must not be installed, otherwise it needs to be installed. Enter rpm -q make to see
that the pcre-devel toolkit is in rpm, so install it with rpm
6. Enter 'cd /opt/httpd-2.4.2' to switch to the decompressed folder for configuration file configuration
7. Enter 'make ' command to convert the configuration file into a binary file.
If there is no error (error) at the end, you can proceed to the next step. Enter the 'make install' command to
switch the binary file compilation and installation to /usr/local/apache, and filter out the script files containing # Annotation of the number.
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.
8. Set the boot to automatically open 3 (init3 character interface, with network), 5 (init5 graphical interface, with network)
9. Establish soft connections for easy management
10. Edit httpd configuration files
11. Turn on httpd
12. Turn off its firewall, open the web page and enter the IP address of the virtual machine to log in.
connection succeeded