Centos openssl编译php,Centos中更新openssl、cur和php的方法

这篇文章主要介绍了关于Centos中更新openssl、cur和php的方法,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下

Centos中更新openssl、cur、phpPHP5 不支持 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.361. 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

以上就是本文的全部内容,希望对大家的学习有所帮助,更多相关内容请关注PHP中文网!

相关推荐:

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值