CentOS 6.5 apache源码安装1.0版

yum install -y pcre-devel zlib-devel(可能需要安装gcc)


tar xf apr-1.5.2.tar.bz2

cd apr-1.5.2

./configure --prefix=/usr/local/apr

make

make install


cd ..

tar xf apr-util-1.5.4.tar.bz2

cd apr-util-1.5.4

./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/

make

make install


cd ..

tar xf httpd-2.4.20.tar.bz2

cd httpd-2.4.20

./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf/ --enable-so --enable--ssl --enable-cgi --enable-expires --enable-deflate --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modeles=most --enable-mpms-shared=all --with-mpm=event | tee /root/apache

make

make install


cp /usr/local/apache/bin/apachectl /etc/init.d/httpd

chmod +x /etc/init.d/httpd

service httpd start

service httpd restart


vim /usr/local/apache/conf/httpd.conf

ServerName localhost:80


vim /etc/profile.d/httpd.sh

export PATH=/usr/local/apache/bin:$PATH

. /etc/profile.d/httpd.sh

httpd -t

相关文章

#使用军哥的lnmp配置虚拟主机,需要注意的是要配置hosts文件(...
一、配置编译环境 yum update && yum upgra...
一、下载repo文件 二、备份并替换系统的repo文件 三、执行yu...
LAMP -- Linux Apache MySQL PHP 在CentOS安装的顺序,我一般...
一、下载nginx安装包,官网下载中心http://nginx.org/downlo...
1.下载composer curl -sS https://getcomposer.org/installe...