The following will introduce the operation method of Apache architecture. First, share the compressed package on the host
machine, then scan the shared file
with the virtual machine, create a mount point on the virtual machine, and mount the scanned shared file
. After that, switch the directory to the mount point, you will see the three compressed packages after sharing,
and then decompress them in turn.
Here, unzip the second apr package.
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
then use the yum repository to install the gcc and gcc-c++ compilers.
Here you can see that the installation is complete
and then install some related software package, because this package has no dependencies, you can use rpm to install it with one click.
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
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
Then use make install to execute the installation of the software compilation environment
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
to filter out the above Because the basic format of the script
also has #, it will be filtered out in front.
After adding the basic format of the script, wq saves and exits to
check whether the script configuration file has execution permission
to add a boot-up self-starting to HTTP. Then he
created a soft link to the service startup configuration file of apahe in 3 and 5 modes, and then edited and
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
find it to ServerName, and modify it to the format of the host name of our virtual machine plus the domain name. After the
service startup configuration file is modified, open the network service
to check whether port 80 of the web service is open
, and then close the firewall and enhanced security functions.
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.
Of course, this content can be modified. Find the html file of the default home page in the path below.
Then use the vim editor to enter, you can see the content displayed on the front page of the browser,
modify the content here to the content you want to display, then save and exit
, refresh in the browser, and the content you modified above will be displayed.
This is the whole process of the apache architecture, I hope you can give me more pointers! ! !