Lamp Architecture (1)-Install Apache

Source: Internet
Author: User

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

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.