免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2351 | 回复: 1
打印 上一主题 下一主题

求救!!安装php+openssl+apache问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-20 14:41 |只看该作者 |倒序浏览
各位大虾,我编译安装php+openssl+apache+libxml2,使用的版本分别为
httpd-2.0.59.tar.gz , libxml2-2.6.11.tar.gz  ,    openssl-0.9.8e.tar.gz和openssl-0.9.7m.tar.gz 都试过,  php-5.2.0.tar.gz,结果是apache能正确支持https服务。但是编译php时总会报错,哪位高手能解释下怎么回事啊。。
错误信息是:
/usr/bin/ld: /home/mis/openssl/lib/libssl.a(s2_srvr.o): relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
/home/mis/openssl/lib/libssl.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libphp5.la] Error 1

论坛徽章:
0
2 [报告]
发表于 2007-07-20 14:54 |只看该作者

我的步骤

1.安装libxml2
cd libxml-2.6.11
./configure --prefix=$HOME/libxml2
make
make install
2.安装openssl
cd openssl-0.9.8e
./config --prefix=$HOME/openssl;make;make install
3.安装apache2
1)cd httpd-2.0.59
./configure --prefix=$HOME/apache2 --enable-ssl --enable-rewrite --with-ssl=$HOME/openssl;make;make install
2)编辑apache2/conf/http.conf
修改port端口号
添加行AddType application/x-httpd-php .php .ssyq
在行DirectoryIndex index.html index.html.var的行尾添加index.php
3)生成认证文件
mkdir ssl.crt
cd ssl.crt
~/openssl/bin/openssl genrsa -out www.example.com.key 1024
~/openssl/bin/openssl rsa -noout -text -in www.example.com.key
~/openssl/bin/openssl req -new -key www.example.com.key  -out www.example.com.csr
~/openssl/bin/openssl req -noout -text -in www.example.com.csr
~/openssl/bin/openssl x509 -req -days 3650 -in www.example.com.csr -signkey www.example.com.key -out www.example.com.cert
4)修改ssl.conf,修改监听端口为8443,修改ssl的认证文件为SSLCertificateFile /home/mis/apache2/conf/ssl.crt/www.example.com.cert
和SSLCertificateKeyFile /home/mis/apache2/conf/ssl.crt/www.example.com.key


4.安装mysql5
cd mysql-5.0.22
./configure --prefix=$HOME/mysql5 --with-unix-socket-path=$HOME/mysql5/tmp/mysql.sock   --with-charset=gbk --with-extra-charsets=gbk
make
make install
cd $HOME/mysql5/bin
./mysql_install_db
cp share/my-medium.cnf ./my.cnf
修改my.cnf
如果机器上有多个mysql服务,需要修改服务端口号
./mysqld_safe --default-file=my.cnf
./mysql -u root
5.安装php5
cd php-5.2.0
./configure --prefix=$HOME/php5 --with-mysql=$HOME/mysql5 --with-mysql-sock=$HOME/mysql5/mysql.sock --with-apxs2=$HOME/apache2/bin/apxs --enable-force-cgi-redirect --enable-pic --enable-inline-optimiation --enable-memory-limit --enable-bcmath --enable-shmop --enable-versioning -enable-calendar --enable-dbx --enable-dio --enable-mcal --with-config-file-path=$HOME/apache2/conf --with-pdo-mysql=$HOME/mysql5 --enable-soap --with-libxml-dir=$HOME/libxml2 --with-openssl=$HOME/openssl

make
make install
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP