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

centos6.9 httpd2.4.33安装

时间:2018-05-24 15:11:23      阅读:140      评论:0      收藏:0      [点我收藏+]

标签:apache

yum install -y pcre-devel zlib-devel gcc
tar xf apr-1.6.3.tar.gz
cd apr-1.6.3
./configure --prefix=/usr/local/apr
make
make install

yum install -y expat-devel libxml2-devel
tar xf apr-util-1.6.1.tar.gz
cd apr-util-1.6.1
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
make
make install

tar xf httpd-2.4.33.tar.bz2
cd httpd-2.4.33
CC="gcc -m64" ./configure --prefix=/usr/local/apache --sysconfdir=/usr/local/apache/conf/ --enable-so --enable-ssl=shared --with-ssl=/usr/local/openssl --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

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

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

centos6.9 httpd2.4.33安装

标签:apache

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

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