apache+openssl

转自:http://qing.blog.sina.com.cn/tj/44bf0603330023r5.html

apache+openssl

发表于:2012年08月16日  23:18 转发 0

正式环境:
系统:Red Hat Enterprise Linux Server release 5.6 (Tikanga)
内核:2.6.18-238.31.1.el5
位数:64
测试环境:
系统:CentOS release 5.8 (Final)
内核:2.6.18-53.el5
位数: 32

相关软件版本及下载地址
1.apr: http://labs.mop.com/apache-mirror//apr/apr-1.4.6.tar.gz
2.apr-util:http://labs.mop.com/apache-mirror//apr/apr-util-1.4.1.tar.gz
3.pcre:http://cdnetworks-kr-2.dl.sourceforge.net/project/pcre/pcre/8.30/pcre-8.30.zip
4.openssl:http://www.openssl.org/source/openssl-1.0.1c.tar.gz
5.apache:http://labs.mop.com/apache-mirror/httpd/httpd-2.4.2.tar.gz
(apr,apr-util,pcre安装在此略过)

测试环境openssl及apache安装方法:
openssl 编译:
./config ; make; make install
apache 编译:
./configure --prefix=/opt/xyz/apache2.4.2_resin4.0.29/apache2  --enable-mods-shared=ALL --enable-so  --with-apr=/usr/local/apr -with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcre --enable-ssl --with-ssl=/usr/local/ssl

正式环境openssl及apache安装方法:
openssl编译:
如果按照测试环境编译,提示如下错误(google出来的结果基本就是说bug之类的,在此顺道鄙视百度一下,连个类似的检索都没有。)
 /usr/bin/ld: /usr/local/ssl/lib/libssl.a(s3_srvr.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

/usr/local/ssl/lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mod_ssl.la] Error 1
make[4]: Leaving directory `/opt/xyz/httpd-2.4.2/modules/ssl'
make[3]: *** [shared-build-recursive] Error 1
make[3]: Leaving directory `/opt/xyz/httpd-2.4.2/modules/ssl'
make[2]: *** [shared-build-recursive] Error 1
make[2]: Leaving directory `/opt/xyz/httpd-2.4.2/modules'
make[1]: *** [shared-build-recursive] Error 1
make[1]: Leaving directory `/opt/xyz/httpd-2.4.2'
make: *** [all-recursive] Error 1
这段错误说明ssl方面的错误,需要重新编译,并添加  -fPIC ​。既然如此,就按照要求来呗,找到openssl的源文件,重新编译,./config -fPIC,make clean 无数遍,最后发现还是提示如上错误。
这下坑爹了,干脆一切删了重来。
64位下成功解决方法:
openssl编译:
./config --prefix=${destination_dir} -fPIC no-gost no-shared no-zlib 
make depend ; make install
apache 编译方法照旧。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值