如何在CentOS 6.6上将apache 2.2.15升级到apache 2.4.12?

hmae6n7t  于 2022-11-07  发布在  Apache
关注(0)|答案(2)|浏览(300)

我试过了,但不管用。
在CentOS 6.6上运行Apache 2.4:
第一步:

cd /etc/yum.repos.d/
wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo

第二步:

yum install httpd24.x86_64

第三步:

$ /opt/rh/httpd24/root/usr/sbin/httpd -version
Server version: Apache/2.4.6 (Red Hat)
Server built:   Sep 25 2013 05:25:46
NOTE: config files are in: /opt/rh/httpd24/root/etc/httpd

$ ls
conf  conf.d  conf.modules.d  logs  modules  run
EDIT: in case you want to switch off Apache 2.2

$ chkconfig httpd off
$ chkconfig --list | grep httpd
httpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
httpd24-httpd   0:off   1:off   2:off   3:off   4:off   5:off   6:off
EDIT 2: http://wiki.apache.org/httpd/PHP-FPM

yum install php-fpm
/etc/init.d/php-fpm start

有没有人知道解决办法,请告诉我。

ijnw1ujt

ijnw1ujt1#

如果您在CentOS 6.6系统上使用Apache源代码自己构建它,那将是最好的。
编译和安装Apache 2.4:
http://httpd.apache.org/docs/current/install.html
在构建过程中记下configure行,这样就可以确保它包含了所有需要的模块(如mod_ssl...等)。

$ CC="pgcc" CFLAGS="-O2" \
./configure --prefix=/sw/pkg/apache \
--enable-ldap=shared \
--enable-lua=shared

如果您需要自己的RPM,请使用您自己的自订建立SPEC档案。

相关问题