目录

CentOS7部署httpd2.4.8(需支持perl)

依赖包安装

1
2
3
4
5
yum -y install  gcc gcc-c++ make zlib zlib-devel openssl expat-devel  openssl-devel pcre pcre-devel
相关包下载地址:https://mirrors.tuna.tsinghua.edu.cn/apache/
apr-1.6.5.tar.gz
apr-util-1.6.1.tar.gz
httpd-2.4.37.tar.gz

安装

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
./configure --prefix=/usr/local/apr
#rm如果报错,修改configure文件,RM='$RM' 修改为RM='$RM -f'
make && make install
安装apr-util
./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
make && make install
安装httpd
./configure \
--prefix=/usr/local/apache/ \
--with-apr=/usr/local/apr/ \
--with-apr-util=/usr/local/apr-util/ \
--enable-so \
--enable-ssl\
--enable-alib\
--with-ssl\
--with--pcre\
--enable-deflate=shared \
--enable-expires=shared \
--enable-rewrite=shared \
--enable-static-support
make && make install

mod_perl支持

otrs系统原本使用的是centos yum安装的httpd2.4.6版本,因安全基线要求,编译了2.4.38至/usr/local/apache目录下,因程序是perl,所以需要添加mod_perl支持 cp /usr/lib64/httpd/modules/mod_perl.so /usr/local/apache/modules/