centos7環境下apache2.2.34的編譯安裝


1.獲取apache2.2.34的源碼包
http://archive.apache.org/dist/httpd/httpd-2.2.34.tar.gz
2.獲取apache的編譯參數
apache的編譯參數

[root@i-job-backend-web01:~]# cat /usr/local/apache2/build/config.nice
#! /bin/sh
#
# Created by configure

"./configure" \
"--prefix=/usr/local/httpd-2.2.26" \
"--enable-isapi" \
"--enable-file-cache" \
"--enable-cache" \
"--enable-mem-cach" \
"--enable-deflate" \
"--enable-expires" \
"--enable-headers" \
"--disable-version" \
"--enable-proxy" \
"--enable-proxy-balancer" \
"--enable-ssl" \
"--enable-static-rotatelogs" \
"--enable-static-htpasswd" \
"--enable-static-htdigest" \
"--enable-static-logresolve" \
"--enable-static-htdbm" \
"--enable-static-ab" \
"--enable-static-checkgid" \
"--enable-static-htcacheclean" \
"--enable-cgi" \
"--enable-vhost-alias" \
"--enable-rewrite" \
"--enable-so" \
"--with-ssl=/usr/local/lab/openssl" \
"--enable-mime-magic" \
"--with-mpm=prefork" \
"$@


# tar –zxf httpd-2.2.34.tar.gz
# cd httpd-2.2.34
# 執行預編譯
./configure \
"--prefix=/usr/local/httpd-2.2.34" \
"--enable-isapi" \
"--enable-file-cache" \
"--enable-cache" \
"--enable-mem-cach" \
"--enable-deflate" \
"--enable-expires" \
"--enable-headers" \
"--disable-version" \
"--enable-proxy" \
"--enable-proxy-balancer" \
"--enable-ssl" \
"--enable-static-rotatelogs" \
"--enable-static-htpasswd" \
"--enable-static-htdigest" \
"--enable-static-logresolve" \
"--enable-static-htdbm" \
"--enable-static-ab" \
"--enable-static-checkgid" \
"--enable-static-htcacheclean" \
"--enable-cgi" \
"--enable-vhost-alias" \
"--enable-rewrite" \
"--enable-so" \
"--with-ssl=/usr/local/lab/openssl-1.0.2p" \
"--enable-mime-magic" \
"--with-mpm=prefork"


......

checking for OpenSSL version... checking openssl/opensslv.h usability... yes
checking openssl/opensslv.h presence... yes
checking for openssl/opensslv.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
OK
  forcing SSL_LIBS to "-lssl -lcrypto  "
  adding "-lssl" to LIBS
  adding "-lcrypto" to LIBS
checking openssl/engine.h usability... yes
checking openssl/engine.h presence... yes
checking for openssl/engine.h... yes
checking for SSLeay_version... no
checking for SSL_CTX_new... yes
checking for ENGINE_init... yes
checking for ENGINE_load_builtin_engines... yes
checking for SSL_set_cert_store... no
configure: error: ... Error, SSL/TLS libraries were missing or unusable
# 因為openssl經常曝出一些大的漏洞,使用最新版本的openssl1.1.0i
--with-openssl=/usr/local/lab/openssl-1.1.0i

# 編譯執行
Make && make install


配置文件可以直接將/usr/local/httpd-2.2.34/conf目錄替換到新的編譯安裝包中
測試

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM