登录  /  注册
Centos中更新openssl、cur和php的方法
不言
发布: 2023-04-02 18:26:01
原创
1787人浏览过

这篇文章主要介绍了关于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
登录后复制

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

相关推荐:

在Laravel 5.6中 使用Swoole的协程数据库查询

以上就是Centos中更新openssl、cur和php的方法的详细内容,更多请关注php中文网其它相关文章!

相关标签:
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 技术文章
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习
PHP中文网抖音号
发现有趣的

Copyright 2014-2023 //m.sbmmt.com/ All Rights Reserved | 苏州跃动光标网络科技有限公司 | 苏ICP备2020058653号-1

 | 本站CDN由 数掘科技 提供

登录PHP中文网,和优秀的人一起学习!
全站2000+教程免费学