Normal User compiled installation httpd-2.4.23

Source: Internet
Author: User

System environment: Cent OS 6.5

HTTP software version: httpd-2.4.23


First, prepare the installation environment

1. Create LV

Lvcreate-l 1g-n LV_HFS vg00


2. Create File system

Mkfs.ext4/dev/vg00/lv_hfs


3. Create groups and users and create user passwords

Groupadd-g HFS

Useradd-u 600-g 600-d/HOME/HFS HFS

PASSW HFS


4, Time automatic mount

Vim/etc/fstab Add the following line

/DEV/VG00/LV_HFS/HOME/HFS EXT4 Defaults 0 0


5. Configure User Environment variables

cp/etc/skel/.*/HOME/HFS

Chown Hfs:hfs-r/HOME/HFS


II. Inspection and preparation of related software packages

1. Check if the Pcre software is installed if it is not installed, install it with Yum

[Email protected] ~]# Rpm-qa | grep pcre

Pcre-7.8-6.el6.x86_64

Pcre-devel-7.8-6.el6.x86_64


2, download the package, as follows

HTTP Download Web site

http://httpd.apache.org/download.cgi

Apr Download website

http://apr.apache.org/download.cgi


as the httpd-2.4.23 version we installed is newer, the CENT OS 6.5 default Apr version is less than apr-1.3.9-5and can only support the httpd version of the 2.2.x series. This is supported by at least 1.4 Apr. So we need to compile and install Apr before we can.

Note: In the apache2.2.x version, you do not need to install APR if you have installed the system's default development Environment Pack group. Direct installation error is as follows

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/85/8F/wKioL1eojbrjvvNjAACkY2UrQsg106.jpg-wh_500x0-wm_3 -wmp_4-s_2930247998.jpg "title=" 1.jpg "alt=" Wkiol1eojbrjvvnjaacky2urqsg106.jpg-wh_50 "/>

The two versions of apr-1.5.2.tar.gz and apr-util-1.5.4.tar.gz are downloaded here.


Third, start to install the relevant software, first upload the relevant software to the/tmp directory, the following to start the installation

1, installation apr-1.5.2

TAR-XVF apr-1.5.2.tar.gz

CD apr-1.5.2

./configure--PREFIX=/USR/LOCAL/APR

Make && make install


2, installation apr-util-1.5.4

TAR-XVF apr-util-1.5.4.tar.gz

CD apr-util-1.5.4

./configure--prefix=/usr/local/apr-util --WITH-APR=/USR/LOCAL/APR (note the APR path here)

Make && make install


3. Use HFS user to install httpd-2.4.23

Chown HFS:HFS httpd-2.4.23.tar.bz2

Su-hfs

cd/tmp/httpd-2.4.23

./configure--prefix=/home/hfs/apache--enable-so--enable--ssl--enable-cgi--enable-rewrite--with-zlib--with-pcre --WITH-APR=/USR/LOCAL/APR--with-apr-util=/usr/local/apr-util--enable-mpms-shared=all--with-mpm=worker-- Enable-modules=most


4. Execute make

# make


5. Execute make Install

# make Install


6, after the installation of the inspection

After the installation is complete, check that Apache is running and loading mode is the same as the expected installation.

# Cd/home/hfs/apache/bin

#./httpd–t Check if the syntax is normal, show Syntax OK, stating that the configuration file syntax is correct

AH00558:httpd:Could not reliably determine the server ' s fully qualified domain name, using 10.1.1.129. Set the ' ServerName ' directive globally to suppress this message

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/85/90/wKiom1eojy7xe5DrAABXtVRt-Cg267.jpg-wh_500x0-wm_3 -wmp_4-s_2759306379.jpg "title=" 1.jpg "alt=" Wkiom1eojy7xe5draabxtvrt-cg267.jpg-wh_50 "/>

Note: This red error above does not affect the start

Workaround: Remove the default comment and change to native IP and port

650) this.width=650; "Src=" Http://s4.51cto.com/wyfs02/M01/85/90/wKiom1eoj-uQ7e1LAABefUrV2MU243.jpg-wh_500x0-wm_3 -wmp_4-s_2368733680.jpg "title=" 1.jpg "alt=" Wkiom1eoj-uq7e1laabefurv2mu243.jpg-wh_50 "/>


Iv. Installation and configuration instructions

--prefix: #自定义apache的安装路径

--with-pcre \ #支持perl的正则表达式

--ENABLE-SO \ # supports DSO (dynamic Sharedobject) Dynamics module loading

--ENABLE-SSL \ #基于ssl加密传输

--ENABLE-CGI \ #开启CGI脚本

--enable-rewrite \ #允许URL rewrite function

--with-zlib \ #支持压缩

--WITH-APR=/USR/LOCAL/APR # Specify Apr path

--with-apr-util=/usr/local/apr-util # specifying Apr-util path

--enable-deflate \ #支持网页压缩

--enable-expires \ #支持网页缓存

--enable-headers \ #提供允许对HTTP请求头的控制

--enable-modules=most \ #支持大多数模块

--enable-mpms-shared=all \ #mpm模块的动态切换

--with-mpm=worker # Set Apache working mode to let Apache run as worker


V. Start the HTTP service

1. Start httpd Service

Cd/home/hfs/apache/bin

./httpd-k Start

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/85/90/wKiom1eokXGAkJucAABiH2ppeB0358.jpg-wh_500x0-wm_3 -wmp_4-s_3304958782.jpg "title=" 1.jpg "alt=" Wkiom1eokxgakjucaabih2ppeb0358.jpg-wh_50 "/>


2. Stop httpd Service

Cd/home/hfs/apache/bin

./httpd-k Stop


Six, follow-up adjustment (each start will need to enter into the $home/bin to operate, more trouble)

1, by adding the environment variable under the HFS user to solve

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M01/85/8F/wKioL1eolKPSJFXLAAAo-dxNVD0731.jpg-wh_500x0-wm_3 -wmp_4-s_2006625218.jpg "title=" 1.jpg "alt=" Wkiol1eolkpsjfxlaaao-dxnvd0731.jpg-wh_50 "/>

This article is from "riding ants watching the Sunset" blog, please be sure to keep this source http://yuricto.blog.51cto.com/2893832/1835858

Normal User compiled installation httpd-2.4.23

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.