我试过了,但没有用。
CentOS 6.6 上的 Apache 2.4:
第一步:
cd /etc/yum.repos.d/
wget http://repos.fedorapeople.org/repos/jkaluza/httpd24/epel-httpd24.repo
第 2 步:
yum install httpd24.x86_64
第 3 步:
$ /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
有没有人知道解决方案,请告诉我。
最佳答案
如果您在 CentOS 6.6 系统上从 Apache 源代码自行构建它会更好。
编译和安装 Apache 2.4:
http://httpd.apache.org/docs/current/install.html
在构建过程中记下配置行,这样你就可以确保它包含你想要的所有模块(比如 mod_ssl 等)。有关可用于位于此处的 configure
行的内容的详细信息 http://httpd.apache.org/docs/current/programs/configure.html
$ CC="pgcc" CFLAGS="-O2" \
./configure --prefix=/sw/pkg/apache \
--enable-ldap=shared \
--enable-lua=shared
如果您想要自己的 RPM,请使用您自己的自定义创建一个 SPEC 文件。
关于apache - 如何在 CentOS 6.6 上将 apache 2.2.15 升级到 apache 2.4.12?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30500382/