centos6.9 httpd2.4.33安装3.0版本

前端之家收集整理的这篇文章主要介绍了centos6.9 httpd2.4.33安装3.0版本前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

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/httpdchmod +x /etc/rc.d/init.d/httpdvim /etc/rc.d/init.d/httpd#chkconfig: 2345 10 90#description: Activates/Deactivates Apache Web Serverchkconfig --add httpdchkconfig --level 35 httpd onvim /usr/local/apache/conf/httpd.confServerName localhost:80vim /etc/profile.d/httpd.shexport PATH=/usr/local/apache/bin:$PATH. /etc/profile.d/httpd.shhttpd -t

原文链接:https://www.f2er.com/centos/374290.html

猜你在找的CentOS相关文章