【发布时间】:2013-12-05 09:56:58
【问题描述】:
操作系统:Red Hat Enterprise Linux Server 6.4 版(圣地亚哥)
当前在这个操作系统上 yum 安装的 apache 是 2.2.15。我需要最新的 2.4.x 分支,所以手动安装它。我已经记录了我进行的完整过程,包括预先将apr和apr-util源解包到apache源中,但我想以下是该过程中最重要的部分:
GATHER LATEST APACHE AND APR
$ cd ~
$ mkdir apache-src
$ cd apache-src
$ wget http://apache.insync.za.net//httpd/httpd-2.4.6.tar.gz
$ tar xvf httpd-2.4.6.tar.gz
$ cd httpd-2.4.6
$ cd srclib
$ wget http://apache.insync.za.net//apr/apr-1.5.0.tar.gz
$ tar -xvzf apr-1.5.0.tar.gz
$ mv apr-1.5.0 apr
$ rm -f apr-1.5.0.tar.gz
$ wget http://apache.insync.za.net//apr/apr-util-1.5.3.tar.gz
$ tar -xvzf apr-util-1.5.3.tar.gz
$ mv apr-util-1.5.3 apr-util
INSTALL DEVEL PACKAGES
yum update --skip-broken (There is a dependency issue with the latest Chrome needing the latest libstdc++, which is not available for RHEL and CentOS)
yum install apr-devel
yum install apr-util-devel
yum install pcre-devel
INSTALL
$ cd ~/apache-src/httpd-2.4.6
$ ./configure --prefix=/etc/httpd --enable-mods-shared="all" --enable-rewrite --with-included-apr
$ make
$ make install
注意:在上面运行时,
/etc/http为空。
在我尝试启动 httpd 服务之前似乎一切正常。似乎httpd.conf 中包含的每个模块都失败了,并显示类似于mod_rewrite 的消息:
httpd: Syntax error on line 148 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_rewrite.so into server: /etc/httpd/modules/mod_rewrite.so: undefined symbol: ap_global_mutex_create
我已经浏览了httpd.conf 中启用的模块列表,并一次将它们注释掉。如上所述都会触发错误,但是“未定义符号:值”通常不同(因此并不总是ap_global_mutex_create)。
我错过了一步吗?尽管我在 Google 上发现了该错误的一部分,但大多数解决方案都围绕着无法访问的 .so 文件。这似乎不是问题,模块存在于/etc/http/modules。
注意:在上面运行时,
/etc/http为空。
【问题讨论】:
标签: apache apache2 redhat rhel