我在 CentOS 中需要 Apache 2.4,因为 Apache 2.2mod_proxy_wstunnel
是不可能的。我努力了这,但不幸的是它适用于 RHEL。安装后,我无法执行Apache 2.4。
谁能告诉我如何在 CentOS 中安装完整的 Apache 2.4?
编辑:
# yum list installed | grep httpd
Failed to set locale, defaulting to C
httpd.x86_64 2.2.15-30.el6.centos @updates
httpd-tools.x86_64 2.2.15-30.el6.centos @updates
httpd24.x86_64 1-6.el6 @epel-httpd24
httpd24-apr.x86_64 1.4.8-2.el6 @epel-httpd24
httpd24-apr-util.x86_64 1.5.2-5.el6 @epel-httpd24
httpd24-httpd.x86_64 2.4.6-5.el6 @epel-httpd24
httpd24-httpd-tools.x86_64 2.4.6-5.el6 @epel-httpd24
httpd24-mod_ssl.x86_64 1:2.4.6-5.el6 @epel-httpd24
httpd24-runtime.x86_64 1-6.el6 @epel-httpd24
答案1
CentOS 上的 Apache 2.4:
步骤1:
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
注意:配置文件位于:/opt/rh/httpd24/root/etc/httpd
$ ls
conf conf.d conf.modules.d logs modules run
编辑:如果您想关闭 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
编辑2: http://wiki.apache.org/httpd/PHP-FPM
yum install php-fpm
/etc/init.d/php-fpm start