Construction of Apache Service in Linux System

The following will introduce the operation method of Apache architecture. First, share the compressed package on the host
Construction of Apache Service in Linux System
machine, then scan the shared file
Construction of Apache Service in Linux System
with the virtual machine, create a mount point on the virtual machine, and mount the scanned shared file
Construction of Apache Service in Linux System
. After that, switch the directory to the mount point, you will see the three compressed packages after sharing,
Construction of Apache Service in Linux System
and then decompress them in turn.
Construction of Apache Service in Linux System
Here, unzip the second apr package.
Construction of Apache Service in Linux System
Unzip the third apr-util package, and then for apr and apr -util can be used by httpd, so copy the apr and apr-util packages to the httpd file and
Construction of Apache Service in Linux System
then use the yum repository to install the gcc and gcc-c++ compilers.
Construction of Apache Service in Linux System
Here you can see that the installation is complete
Construction of Apache Service in Linux System
and then install some related software package, because this package has no dependencies, you can use rpm to install it with one click.
Construction of Apache Service in Linux System
After installing the function library of a regular expression function library of pcre-devel, use configure to configure the software
module./configure \
--prefix=/usr/local/apache \ here is the specified installation path
--enable-so \ use dynamic module loading
--enable-rewrite \ enable rewrite support
--enable-mods-shared=most \ enable
modules- -with-mpm=worker \ Enable multithreading
--disable-cgid \
--disable-cgi Universal gateway interface After the
Construction of Apache Service in Linux System
software configuration module is installed, use make to convert the format, so that the configuration file is converted into binary and can be recognized and executed by the system
Construction of Apache Service in Linux System
Then use make install to execute the installation of the software compilation environment
Construction of Apache Service in Linux System
and then use filter to filter out the content of the #comment apache script and then redirect to the init.d directory that can be executed by service, and then use service to operate
Construction of Apache Service in Linux System
to filter out the above Because the basic format of the script
Construction of Apache Service in Linux System
also has #, it will be filtered out in front.
Construction of Apache Service in Linux System
After adding the basic format of the script, wq saves and exits to
Construction of Apache Service in Linux System
check whether the script configuration file has execution permission
Construction of Apache Service in Linux System
to add a boot-up self-starting to HTTP. Then he
Construction of Apache Service in Linux System
created a soft link to the service startup configuration file of apahe in 3 and 5 modes, and then edited and
Construction of Apache Service in Linux System
changed the listening object here to the IP address of our virtual machine and deleted the preceding comment # # Delete, Annotate the listening port of ipv6 and
Construction of Apache Service in Linux System
find it to ServerName, and modify it to the format of the host name of our virtual machine plus the domain name. After the
Construction of Apache Service in Linux System
service startup configuration file is modified, open the network service
Construction of Apache Service in Linux System
to check whether port 80 of the web service is open
Construction of Apache Service in Linux System
, and then close the firewall and enhanced security functions.
Construction of Apache Service in Linux System
After the above is completed, open the host browser, enter the listening IP address we just entered in the link window, and you can see a content.
Construction of Apache Service in Linux System
Of course, this content can be modified. Find the html file of the default home page in the path below.
Construction of Apache Service in Linux System
Then use the vim editor to enter, you can see the content displayed on the front page of the browser,
Construction of Apache Service in Linux System
modify the content here to the content you want to display, then save and exit
Construction of Apache Service in Linux System
, refresh in the browser, and the content you modified above will be displayed.
Construction of Apache Service in Linux System

This is the whole process of the apache architecture, I hope you can give me more pointers! ! !

Guess you like

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