CentOS 6.3 Installing the Apache2.2.6 Method (source compilation installation) _linux

Source: Internet
Author: User

Installation Instructions
Installation Environment: CentOS-6.3
Installation Method: source code compilation installation
Software: httpd-2.2.6.tar.gz | pcre-8.32.tar.gz | apr-1.4.6.tar.gz | Apr-util-1.5.1.tar.gz
Download Address: http://mirror.bjtu.edu.cn/apache/httpd/
http://apr.apache.org/download.cgi
Http://jaist.dl.sourceforge.net/project/pcre/pcre
Installation Location:/urs/local/apache

Installation Prerequisites
The system has GCC and cmake installed, please refer to the CentOS-6.3 installation configuration CMake If it is not installed.
Perform the following actions:

Copy Code code as follows:

#检查是否安装了apache
[Root@localhost/]# Rpm-qa | grep httpd
Httpd-2.2.15-15.el6.centos.1.x86_64
Httpd-tools-2.2.15-15.el6.centos.1.x86_64
#卸载系统自带的apache
[Root@localhost/]# rpm-e--nodeps httpd-2.2.15-15.el6.centos.1.x86_64
[Root@localhost/]# rpm-e--nodeps httpd-tools-2.2.15-15.el6.centos.1.x86_64
#使用yum卸载
[Root@localhost apache]# Yum Remove Apache

#检验apr版本, uninstall install new version
[Root@localhost apache]# Rpm-qa | grep Apr
Apr-1.3.9-5.el6_2.x86_64
Apr-util-1.3.9-3.el6_0.1.x86_64
Apr-util-ldap-1.3.9-3.el6_0.1.x86_64
#卸载apr
[Root@localhost apache]# Yum Remove Apr
Yum Remove apr-util-devel Apr apr-util-mysql apr-docs apr-devel apr-util Apr-util-docs
#安装pcre
[Root@localhost local]# tar-zxv-f pcre-8.32.tar.gz
[Root@localhost local]# CD pcre-8.32
[Root@localhost apr-1.4.6]#./configure
[Root@localhost apr-1.4.6]# make
[Root@localhost apr-1.4.6]# make install

#安装新版本apr
[Root@localhost local]# tar-zxv-f apr-1.4.6.tar.gz
[Root@localhost local]# CD apr-1.4.6
[Root@localhost apr-1.4.6]#./configure--prefix=/usr/local/apr
[Root@localhost apr-1.4.6]# make
[Root@localhost apr-1.4.6]# make install

#安装apr-util
[Root@localhost local]# tar-zxv-f apr-util-1.5.1.tar.gz
[Root@localhost local]# CD apr-util-1.5.1
[Root@localhost apr-util-1.5.1]#./configure--prefix=/usr/local/apr-util--WITH-APR=/USR/LOCAL/APR
[Root@localhost apr-util-1.5.1]# make
[Root@localhost apr-util-1.5.1]# make install

Install Apache
Upload httpd-2.4.3.tar.gz to/usr/local and do the following:

Copy Code code as follows:

#执行安装
[Root@localhost local]# cd/usr/local
[Root@localhost local]# tar-zxv-f httpd-2.4.3.tar.gz #解压压缩包
[Root@localhost local]# rm-rf httpd-2.4.3.tar.gz #删除压缩包
[Root@localhost local]# MV httpd-2.4.3 Apache
[Root@localhost local]# CD Apache
#设置参数安装
[Root@localhost php5.4]#./configure--prefix=/usr/local/apache--with-apr=/usr/local/apr--with-apr-util=/usr/ local/apr-util/
[Root@localhost php5.4]# make
[Root@localhost php5.4]# make install

Verifying installation
To start the Apache server:

[Root@localhost/]#/usr/local/apache/bin/apachectl start

Using Browser access: http://192.168.15.239/The following information appears:

Congratulations, installation success!!

Related Article

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.