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

标签 apache centos

我试过了,但没有用。

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/

相关文章:

python - Django 在 suburl 登录应用程序,url 重定向无法正常工作

php - 使用 SED 命令更改文本

linux - ssh:尝试从主机(centOS 6.5)到访客服务器(在 oracle virtual box,ubuntu 15 上)的 ssh 时连接被拒绝

linux - centos7 : create service to start script bash

linux - 在 CentOS 8 中从 pgdg 存储库安装 postgresql12-server 后找不到 pg_ctl

python - 为什么我的 Apache 看不到我的媒体文件夹?

linux - 让 Apache httpd 监听端口 80,但不是以 root 身份启动?

PHP 语言环境 de_DE 正在返回英语语言环境

java - 如何使用 ApacheConnector 在 Jersey 2 中选择密码套件?

未设置 PHP cURL 选项