1.apache 2.4.39 编译安装选项
- ./configure --prefix=/usr/local/apache24 --sysconf=/etc/httpd24 --enable-so --enable-ssl --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modules=most --enable-mpms-shared=all --with-mpm=prefork
- make -j8 && make install
2. 下载最新 repo 文件方式安装 (ius 方式安装)
- wget https://mirrors.tuna.tsinghua.edu.cn/ius/ius-release-el7.rpm
- yum remove httpd httpd-tools-2.4.6-89.el7.CentOS.x86_64
- yum install ius-release-el7.rpm -y
- yum install httpd24u -y
3. 在原有版本的基础上升级安装 apache 2.4.39
- cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el`rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo
- yum install httpd httpd-tools -y
- httpd -v
- Server version: Apache/2.4.39 (codeit)
- Server built: May 31 2019 14:14:30
总结: 在网络好的情况下或者需要不需要编译什么特殊功能建议采用 yum 方式安装!
来源: http://www.bubuko.com/infodetail-3106372.html