Centos7 安装PHP扩展

PHP 扩展,每次编译安装挺麻烦,而用yum装就很简单
前提:PHP必须是yum安装的
如果是编译安装的PHP,那么扩展你也只有编译安装了

第一步 搜索

yum search php72-php-gd

注意名字要根据你安装的PHP版本来搜索
或者直接搜索全部
比如:你安装的php72版本

yum search php72
已加载插件:fastestmirror
Repository epel is listed more than once in the configuration
Repository epel-debuginfo is listed more than once in the configuration
Repository epel-source is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * remi-safe: ap.stykers.moe
 * updates: mirrors.aliyun.com
============================================================================================================================== N/S matched: php72 ==============================================================================================================================
php72-php-fpm.x86_64 : PHP FastCGI Process Manager
php72-php-gd.x86_64 : A module for PHP applications for using the gd graphics library
php72-php-geos.x86_64 : PHP module for GEOS

在结果里面找到你要安装的扩展

第二步 安装

yum install -y php72-php-gd

收工

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值