CentOS   发布时间:2022-04-02  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了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 ./con

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

@H_277_14@make

@H_277_14@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/

@H_277_14@make

@H_277_14@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需要安装

@H_277_14@make

@H_277_14@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

大佬总结

以上是大佬教程为你收集整理的CentOS 6.5 apache源码安装2.0版全部内容,希望文章能够帮你解决CentOS 6.5 apache源码安装2.0版所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。