The construction of Apache service in Linux system

Source: Internet
Author: User

below to introduce you to the Apache architecture operation Method, first of all, the host on the compression package to share

Then use the virtual machine to scan the shared files

Create a mount point on the virtual machine to mount the scanned shared file

After the mount is mounted, switch the directory to the mount point and see the three compressed packages after sharing

Then unzip in turn

Here, unzip the second Apr.

Unzip the third Apr-util compressed package, and then in order to be APR and apr-util can be used by httpd, so to copy the APR and Apr-util package to the httpd file

Then use the Yum repository to install GCC and gcc-c++ two compilers

Here you can see that the installation is complete.

Then install some related packages, because this package does not have dependencies, so use the RPM one-click installation can, here's the pcre-devel of a regular expression of the function library

After installing the library, use configure to configure the software module.
./configure \
--prefix=/usr/local/apache \ Here is the specified installation path
--ENABLE-SO \ Using dynamic module loading
--enable-rewrite \ Start rewrite support
--enable-mods-shared=most \ Enable Module
--with-mpm=worker \ Enable Multithreading
--disable-cgid \
--DISABLE-CGI Universal Gateway Interface

After the Software configuration module is installed, use make to format the conversion, so that the configuration file into binary can be recognized by the system execution

Then use make install to perform the installation of the software compilation environment

Then use the filter to filter out the contents of the Apache script and redirect it to the directory of the INIT.D that can be executed by the service, and then use the service to manipulate it.

Edit the script filtered out of the filter above

Because the basic format of the script also has #, so the front will be filtered out, here to add the basic format of the script

After adding Wq save exit

To see if the script configuration file has Execute permissions

A boot-on-boot add to HTTP, followed by his boot in 3, 5 mode

Create a soft link to the Apahe service startup profile and edit it

Change the Listener object here to the IP address of our virtual machine and delete the previous comment #, and annotate the IPv6 listening port.

Find servername, modify the format of the hostname plus the domain name for our virtual machine

After the service startup configuration file is modified, turn on the network service.

See if the Web service 80 port is turned on

Then turn off firewall and enhanced security features

After the completion of the above, open the host browser, in the link window input we just entered the listening IP address, you can see a content

Of course, this content can be modified, in the path to find the default home page of the HTML file

Then use the Vim editor to enter, you can see the front page of the browser display content

Modify the content here to the content you want to display, and then save the exit

When the browser refreshes, it will show you what you have changed.

This is the Apache framework of a whole process, I hope that the great God more guidance!!!

The construction of Apache service in Linux system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.