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

不言
發布: 2023-04-02 18:26:01
原創
2353 人瀏覽過

這篇文章主要介紹了關於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.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
作者最新文章
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板
關於我們 免責聲明 Sitemap
PHP中文網:公益線上PHP培訓,幫助PHP學習者快速成長!