centos7环境下apache2.2.34的编译安装

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目录替换到新的编译安装包中
测试

 

posted @ 2018-12-26 20:16 reblue520 阅读( ...) 评论( ...) 编辑 收藏
  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值