【经验】Centos中更新openssl、cur、php

发布时间:2019-08-07 发布网站:脚本宝典
脚本宝典收集整理的这篇文章主要介绍了【经验】Centos中更新openssl、cur、php脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。

Centos中更新oPEnssl、cur、php

PHP5 不支持 openssl1.1

openssl 降版本

1 wget https://www.openssl.org/source/openssl-1.0.2o.tar.gz
2 tar zxvf openssl-1.0.2o.tar.gz
3 cd openssl-1.0.2o
4 ./config -fPIC --PRefix=/usr/local/openssl enable-shared 
 
注释: --prefix:指定安装目录 -fPIC:编译openssl的静态库  enable-shared:编译动态库
 
5 ./config -t
6 make 
7 make install

8 创建软连接 
  ln -s /usr/local/openssl/bin/openssl /usr/bin/openssl
  ln -s /usr/local/openssl/include/openssl /usr/include/openssl
  echo "/usr/local/openssl/lib" >> /etc/ld.so.conf

9 修改系统自带的库
  ln -s /usr/local/openssl/lib/libssl.so /usr/lib64/libssl.so

curl 重新编译

1 wget https://curl.haxx.se/download/curl-7.60.0.tar.gz
2 tar -zxvf curl-7.60.0.tar.gz 
3 cd curl-7.60.0
4 ./configure --with-ssl=/usr/local/openssl  --prefix=/usr/local/curl
5 make & make install
6 创建软连接
  ln -s /usr/local/curl/bin/curl /usr/bin/curl
  ln -s /usr/local/curl/include/curl /usr/include/curl
  echo "/usr/local/curl/lib" >> /etc/ld.so.conf
7 curl -V

安装php 5.6.36

1. wget http://cn.php.net/distributions/php-5.6.36.tar.gz
2. tar zxvf php-5.6.36.tar.gz
3. cd php-5.6.36
4 配置:

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc 
--with-MySQL=mySQLnd --with-mysqli=mysqlnd 
--enable-FPM --enable-mbstring=all 
--with-curl=/usr/local/curl 
--with-openssl=/usr/local/openssl

5 make && make install
6 停止php服务: 
  killall php-fpm
7 重启php服务: 
  ./php/sbin/php-fpm -c /usr/local/php/etc/php.ini -y /usr/local/php/etc/php-fpm.conf

脚本宝典总结

以上是脚本宝典为你收集整理的【经验】Centos中更新openssl、cur、php全部内容,希望文章能够帮你解决【经验】Centos中更新openssl、cur、php所遇到的问题。

如果觉得脚本宝典网站内容还不错,欢迎将脚本宝典推荐好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。