CentOS7編譯安裝httpd-2.4.41

安裝參考環境:apache

  CentOS Linux release 7.5.1804 (Core)spa

 

1、安裝依賴包

httpd安裝的依賴包
# yum -y install pcre-devel                  
# yum -y install openssl-devel 
# yum -y groupinstall "Development Tools"  

arp-util安裝的依賴包
# yum install expat-devel     

 

2、編譯安裝apr-1.7.0

# wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.7.0.tar.g
# tar xf apr-1.7.0.tar.gz
# cd apr-1.7.0
# ./configure -prefix=/usr/local/apr
# make && make install

 

3、編譯安裝apr-util-1.6.1

# wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-util-1.6.1.tar.gz
# tar xf apr-util-1.6.1.tar.gz
# cd apr-util-1.6.1
# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr/
# make && make install

 

4、編譯安裝httpd-2.4.41

# wget http://mirror.bit.edu.cn/apache//httpd/httpd-2.4.41.tar.gz
# tar xf httpd-2.4.41.tar.gz
# cd httpd-2.4.41
# ./configure --prefix=/usr/local/apache --sysconfdir=/etc/httpd --enable-so --enable-ssl --enable-cgi --enable-rewrite --with-zlib --with-pcre --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-modeles=most --enable-mpms-shared=all --with-mpm=event
# make && make install

 

5、啓動httpd

# /usr/local/apache/bin/apachectl start
相關文章
相關標籤/搜索