How to Install GD for PHP on CentOS 6

GD is a graphics library available for PHP. It gives PHP the ability to create GIF, PNG, JPEG, WBMP, and XPM image formats. GD can even output image streams directly to a browser. On CentOS 6, GD is available as an RPM and can easily be installed with yum.

Installing GD

To install GD on CentOS 6, simply run:

yum install gd-php

Restart your Web Server

After installing GD, restart your web server. Assuming you're running Apache, you can run:

/etc/init.d/httpd restart

Confirm GD is Installed

You can list available PHP modules to confirm GD was successfully installed:

php -m | grep -i gd

Here's example output showing GD has been installed:

[root@vps ~]# php -m | grep -i gd
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to connect to your server via SSH using PuTTY

You will need the Acenet recommended SSH client PuTTY downloaded to your local machine before...

How to Fix an IPtables Lockout (VPS/Dedicated Server w/cPanel)

If you're unable to access your server via SSH because of a rule added to iptables in error, it...

How to Install APC on CentOS 6

APC (Alternative PHP Cache) is an opcode cache for PHP. APC provides a caching system for...

How to install Apache Tomcat using WHM (Web Host Manager)

This article is for client's with virtual and dedicated servers. Apache Tomcat is not supported...

How to Disable a Specific Rule for Mod security on a Single Domain

This article pertains specifically to Dedicated Servers and Virtual Servers. The apache...