First, need to know before installation
1, first need to mount the CD on Linux
2, install Apache need to use three software packages: http-2.4.2.tar.gz, apr-1.4.6.tar.gz, apr-util-1.4.1.tar.gz, in order to solve the dependencies of the package need to establish the Yum warehouse beforehand, Installing using the Yum Repository
3, because it is installed in the virtual machine, need to use the package is from the host in the use of shared folders to share the way to Linux
4, 192.168.10.10 for the virtual machine Linux IP address, 192.168.10.20 for the host VMNET1 network card IP address, virtual machine and host to communicate with the virtual machine network adapter is set to host-only mode
Second, start the experiment
1, mount the CD on Linux, the first need to connect the CD and then use the Mount command to mount the CD to the empty folder/mnt, empty folder can be
2. Establishment of the Yum Warehouse
3. Share the three packages that need to be installed from the host to the virtual machine
First the host needs to share the folder properties of the three feature packs, add everyone to the shared user
Second, you need to unblock guest users in the host, in the Local Users and groups managed by the computer
And finally set the local policy
4, you can detect the host shared folder in virtual machine Linux
5, the virtual machine to establish the folder/apache, the host shared folder/apache mounted to the virtual machine/apache can be used
6, extract three packages to the empty folder/opt, empty folder can be
7, the extracted/apr-1.4.6 and/apr-util-1.4.1 two folders copied to/httpd-2.4.2/srclib/, respectively named Apr and Apr-util, apr-1.4.6 and apr-util-1.4.1 can alleviate the concurrent connection number process in some role
8. Install the required basic environment package with Yum, including: GCC, gcc-c++, make, Pcre, Pcre-devel five packages (pcre: A Perl library, supports regular expressions).
Pick up
9, go to/opt/httpd-2.4.2 directory, perform configure configuration, enter
./configure \
--prefix=/usr/local/apache \
--ENABLE-SO \
--enable-rewrite \
--enable-mods-shared=most \
--with-mpm=worker \
--disable-cgid \
--disable-cgi
10. Use the make command to turn the configuration file into an executable file, and then install the executable file using the Make install command, which can be executed with the Make&&make install and execute the make install immediately. However, executing this command ensures that the previous step of configure configuration and make is not error-free, and it is recommended that you do it separately for the first time.
11. Overwrite the/usr/local/apache/bin/apachectl script file in the/ETC/INIT.D/HTTPD to facilitate service execution
12, edit the/etc/init.d/httpd file, because the previous step to filter out all the comments, now at the beginning of this file Insert script file fixed format, making it a real script file.
13, check whether/ETC/INIT.D/HTTPD permissions can be executed, if not executable with this command chmod +x/etc/init.d/httpd add executable permissions
14, with Chkconfig--list httpd see if there is no httpd service, if there is no need to use Chkconfig--add httpd Add, set httpd services in the graphics and character interface boot from start
15, edit the configuration file, here convenient management can establish a soft link, directly edit the linked file
Use the slash/listen to find the listening port line, the source file is
Change to the following
Change the domain name, use the slash/servername to find the domain name line, the source file is
Change the domain name as follows
16. Turn on the HTTPD service to see if the TCP protocol 80 port is turned on
17, with the host test whether you can access the home page, the virtual machine Linux firewall, and security features to shut down
See the following interface as Apache has been built successfully
18, the website home storage path is/usr/local/apache/htdocs/index.html, can be modified
The source files are as follows
can be edited and changed as follows
Visit again, as follows
This experiment is done
Lamp Architecture Manual Compilation installation Apache