首先我们检查GD库是否安装
php -i | grep -i --color gd
安装GD库
yum install php-gd*
安装完成之后配置php.ini文件
extension=gd.so
如果yum失败执行
有种可能是:
CentOS6.6下yum安装PHP默认版本5.3的,为了安装高一点的PHP版本,使用自定义的yum源:remi源,启用remi-php56,安装php-gd扩展的时候报错
所以使用下面的命令执行
yum --enablerepo=remi-php56 install php-gd