Jump to content

6.安装PHP扩展模块 exif、gmp、更新curl版本


Recommended Posts

---------------------------------------------
安装PHP扩展模块 exif、gmp
---------------------------------------------

查看已安装的PHP扩展模块
没有exif、gmp
/usr/local/php/bin/php -m

 

解压PHP原码包
cd /root/lnmp1.8/src/

tar jxvf php-8.0.9.tar.bz2


-----------------------------------------
make exif 扩展模块
-----------------------------------------

cd /root/lnmp1.8/src/php-8.0.9/ext/

cd exif/

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config

make && make install

 

-----------------------------------------
make gmp 扩展模块
-----------------------------------------

cd /root/lnmp1.8/src/php-8.0.9/ext/

cd gmp/

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config

make && make install

 

-----------------------------------------
启用PHP扩展模块 exif、gmp
-----------------------------------------

修改php.ini
vi /usr/local/php/etc/php.ini


搜索 ;zend_extension=opcache
 


;extension=soap
;extension=sockets
;extension=sodium
;extension=sqlite3
;extension=tidy
;extension=xsl

;zend_extension=opcache

在此处底下添加
extension = "exif.so"
extension = "gmp.so"

 

保存并离开
:wq

 

重启
/etc/rc.d/init.d/php-fpm restart

 

查看已安装的PHP扩展模块
可以找到exif、gmp
/usr/local/php/bin/php -m

 


---------------------------------------------
更新curl版本
---------------------------------------------

查看curl版本
curl --version


得知curl版本
curl 7.61.1 (x86_64-redhat-linux-gnu) libcurl/7.61.1 OpenSSL/1.1.1g zlib/1.2.11 brotli/1.0.6 libidn2/2.2.0 libpsl/0.20.2 (+libidn2/2.2.0) libssh/0.9.4/openssl/zlib nghttp2/1.33.0


IPS论坛需要cURL版本高于7.36版本

因此在LNMP 1.8版本不用更新curl


更新curl版本,参考此网站
https://www.imydl.tech/linux/759.html


添加一个repo
vi /etc/yum.repos.d/city-fan.repo

将以下的内容复制粘贴
[CityFanforCurl]
name=City Fan Repo
baseurl=http://www.city-fan.org/ftp/contrib/yum-repo/rhel7/x86_64/
enabled=0
gpgcheck=0


保存并离开
:wq


开始更新curl版本
yum update curl --enablerepo=CityFanforCurl -y


重启
/etc/rc.d/init.d/php-fpm restart


查看curl版本
curl --version
 

Edited by Jack
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...