Install php-gd in CentOS

I just get in touch with my friend server, he run his VPS server that use CentOS.

Basically he got problem to enable gd extension in his php installation. He ask me to see his server.

Well, I don’t have experience with CentOS but its not worth to try since I ever use Redhat from version 5 that accidently damage my harddisk 🙂

Trying to install with yum.

[root@server yum.repos.d]# yum install php-gd

Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Excluding Packages in global exclude list
Finished
Parsing package install arguments
Nothing to do

Well, something might be wrong, check repo files.

[root@server yum.repos.d]# ls

CentOS-Base.repo  CentOS-Media.repo
[root@server yum.repos.d]# cd ..
[root@server etc]# ls

[main]
#exclude=apache* courier* exim* httpd* mod_ssl* mysql* perl* php* proftpd* pure-ftpd* spamassassin* squirrelmail*
exclude=apache* courier* exim* httpd* mod_ssl* mysql* perl* proftpd* pure-ftpd* spamassassin* squirrelmail*
cachedir=/var/cache/yum
keepcache=1
debuglevel=2
logfile=/var/log/yum.log
pkgpolicy=newest
distroverpkg=redhat-release
tolerant=1
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
metadata_expire=1800

# PUT YOUR REPOS HERE OR IN separate files named file.repo
# in /etc/yum.repos.d

as I see in ‘exclude‘ list,  php* exist . That make php-gd isn’t available for installing.

Just remove that from exclude list and I can see gd support from phpinfo() page 🙂