在CentOS7上編譯安裝apache 2.4源碼包,并啟動此服務

  • 1 關閉firwalld
  • systemctl stop firewalld
  • systemctl disable firewalld
  • 2 關閉SElinux
  • setenforce 0
  • vim /etc/selinux/config
  • 找到以SELINUX開頭的那行,修改成SELINUX=disabled
  • 以下就是腳本里的內容,執行就OK了
  • yum groupinstall -y “development tools”
    yum install -y openssl-devel
    tar xvf httpd-2.4.33.tar.bz2
    cd httpd-2.4.33
    wget -SO arp-1.5.2.tar.gz http://mirrors.aliyun.com/apache/apr/apr-1.5.2.tar.gz
    wget -SO arp-util-1.5.4.tar.gz http://mirrors.aliyun.com/apache/apr/apr-util-1.5.4.tar.gz
    tar fxz arp-1.5.2.tar.gz
    tar fxz arp-util-1.5.4.tar.gz
    cp -r arp-1.5.2 srclib/
    cp -r arp-util-1.5.4 srclib/
    ./configure –prefix=/app –sysconfdir=/etc/httpd24 –enable-ssl –with-apr=/usr/local/apr –with-apr-util=/usr/local/apr-util
    make -j 4 && make install
    grep “/app/bin” /etc/profile.d/env.sh && echo ok||echo”PATH=/app/bin:$PATH”>>/etc/profile.d/env.sh
    source /etc/profile.d/env.sh
    apachectl start

本文來自投稿,不代表Linux運維部落立場,如若轉載,請注明出處:http://www.www58058.com/96876

(4)
從那以后從那以后
上一篇 2018-04-22
下一篇 2018-04-22

相關推薦

欧美性久久久久