码迷,mamicode.com
首页 > Web开发 > 详细

linux apache源码安装1.0版

时间:2016-12-05 23:48:33      阅读:232      评论:0      收藏:0      [点我收藏+]

标签:apache服务器

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


本文出自 “每天进步一点点” 博客,请务必保留此出处http://zuoshou.blog.51cto.com/2579903/1879691

linux apache源码安装1.0版

标签:apache服务器

原文地址:http://zuoshou.blog.51cto.com/2579903/1879691

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!