CentOS 6.5 apache源码安装2.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


groupadd www

useradd -g www -s /sbin/nologin -M www

 

yum install -y openssl openssl-devel(ssl需要安装)


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    --enable-ssl=shared --with-ssl=/usr/local/openssl(ssl需要安装)

make

make install


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

chmod +x /etc/rc.d/init.d/httpd

vim /etc/rc.d/init.d/httpd

#chkconfig: 2345 10 90

#description: Activates/Deactivates Apache Web Server

chkconfig --add httpd

chkconfig --level 35 httpd on


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


service httpd strat










本文转自 jin626889 51CTO博客,原文链接:http://blog.51cto.com/zuoshou/1956521,如需转载请自行联系原作者
目录
相关文章
|
7月前
|
Apache Windows
windows源码安装apache2 win安装apache 阿帕奇服务器
windows源码安装apache2 win安装apache 阿帕奇服务器
184 0
|
8月前
|
Linux Apache
CentOS 7 源码安装LAMP环境源 和apache监听别的端口
CentOS 7 源码安装LAMP环境源 和apache监听别的端口
70 0
|
域名解析 应用服务中间件 编译器
Apache 源码安装详细教程
Apache 源码安装详细教程
397 0
Apache 源码安装详细教程
|
监控 Linux Apache
CentOS7.0源码安装Apache
CentOS7.0源码安装Apache
1629 0
|
关系型数据库 应用服务中间件 PHP