发布于 2015-06-01 01:54:24 | 2933 次阅读 | 评论: 1 | 来源: PHPERZ

这里有新鲜出炉的精品教程,程序狗速度看过来!

Apache Web服务器

Apache是世界使用排名第一的Web服务器软件。它可以运行在几乎所有广泛使用的计算机平台上,由于其跨平台和安全性被广泛使用,是最流行的Web服务器端软件。


正式环境:
系统: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 编译方法照旧。


最新网友评论  共有(1)条评论 发布评论 返回顶部
wmhhk 发布于2016-09-05 14:10:52
垃圾
支持(0)  反对(0)  回复

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务