1、获取源码

  wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.37.tar.gz

2、卸载centos自带的apache

  Apache 在Linux上的安装

  Apache 在Linux上的安装

3、解压apache目录

  tar -zxvf apache-2.4.37

4、./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite --enable-charset-lite --enable-cgi

  --prefix  #安装目录
  --enable-so  #启用加载状态模块
  --enable-rewrite  #启用网页地址重写功能
  --enable-charset-lite  #启用字符集支持
  --enable-cgi  #启用CGI脚本程序支持
  Apache 在Linux上的安装
5、安装apr
  wget http://mirrors.hust.edu.cn/apache//apr/apr-1.6.5.tar.gz
  wget http://mirrors.hust.edu.cn/apache//apr/apr-util-1.6.1.tar.gz
  Apache 在Linux上的安装
  安装pcre
  yum -y install pcre 
  yum -y install pcre-devel 
  yum -y install openssl-devel 
6、./configure --prefix=/usr/local/httpd --enable-so --enable-rewrite --enable-charset-lite --enable-cgi --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util
  make && make install
  Apache 在Linux上的安装

7、开启httpd

  Apache 在Linux上的安装

  Apache 在Linux上的安装

 

 
 

相关文章:

  • 2021-10-12
  • 2021-09-15
  • 2022-12-23
  • 2022-02-22
  • 2021-09-12
  • 2021-09-17
  • 2021-09-07
  • 2021-10-03
猜你喜欢
  • 2021-08-06
  • 2022-12-23
  • 2021-06-16
  • 2021-07-24
  • 2021-09-07
  • 2022-12-23
  • 2021-08-25
相关资源
相似解决方案