This blog is the first step to build the lamp architecture, install Apache
Lab Environment: redhat6.5
Experimental PURPOSE: Installing Apache
Preparation material: redhat6.5 System Apache installation package
Experimental steps:
Input tar xzvf http-2.4.2.tar.gz-c/opt
Tar xzvf apr-1.4.6.tar.gz-c/opt
Tar xzvf apr-util-1.4.1.tar.gz-c/opt
Install in sequence
Input Cp-r apr-1.4.6//OPT/HTTPD-2.4.2/SRCLIB/APR
Cp-r APR-UTIL-1.4.1//opt/httpd-2.4.2/srclib/apr-util
Two APR packets are copied into the httpd
Enter yum install gcc gcc-c++ make pcre pcre-devel-y
Yum installing the front-facing package
Enter cd/opt/httpd-2.4.2 into the directory
Re-enter
./configure \
--prefix=/usr/local/apache \
--ENABLE-SO \
--enable-rewrite \
--enable-mods-shared=most \
--with-mpm=worker \
--disable-cgid \
--disable-cgi
Run finished running as
Next enter make & makes install
Installation Complete AS
Enter Grep-v "#"/usr/local/apache/bin/apachectl >/ETC/INIT.D/HTTPD
and vi/etc/init.d/httpd for editing.
Insert the following line at the front of the file
#!/bin/sh
chkconfig:2345 85 15
# description:Apache is a World Wide Web server.
In turn, enter
chmod +x/etc/init.d/httpd giving permission to run
Chkconfig--add httpd
Chkconfig--list httpd
Chkconfig--level httpd on self start
Ln-s/usr/local/apache/conf/httpd.conf/etc/httpd.conf Establish soft connection for easy management
vi/etc/httpd.conf for editing
Listen for 80 ports on this machine
Change host Name
Turn off the firewall and restart the HTTPD service
Access the native IP via another machine when the It works! is displayed The Apache installation was successful
Lamp Architecture (1)-Install Apache