jump to navigation

How to Install GD Library For PHP5 On CentOS November 26, 2010

Posted by Tournas Dimitrios in Linux.

GD is an open source code library for the dynamic creation of images by programmers. GD is written in C, and “wrappers” are available for Perl, PHP and other languages. GD creates PNG, JPEG and GIF images, among other formats. GD is commonly used to generate charts, graphics, thumbnails, and most anything else, on the fly. While not restricted to use on the web, the most common applications of GD involve website development.

GD has moved!

The GD library has moved to libgd.org, thanks to the hard work of Pierre Joye of the PHP project. The project is now headed by Pierre Joye, a well-known PHP developer. Pierre welcomes the contributions of distribution maintainers and other developers.

Yes, gd will continue to support other languages as well as PHP. After all, the larger the community fixing bugs, the better gd is for everyone.

Version 2.0.34 has been released by Pierre, incorporating many important fixes. Major feature changes will appear in a forthcoming gd 2.1.x series.

The latest bleeding-edge GD code can be obtained via CVS – and you’re welcome to join the team!

Visit www.libgd.org for more information.

How to install gd on CentOs 5.x :

An easy task, using yum. First step, see if it’s already installed.

[root@srv]# rpm -qa | grep php

An alternative way to find all the features  your php installations   supports (gd library included ) is to create a phpinfo()  text file , and access it through your browser .

If the GD Library isn’t present in that list, it wasn’t installed on the server yet. Install it using yum :  yum install php-gd

Easy going, isn’t it?

Restart your apache, and you’re ready to rock.



1. Bandwidth monitoring with vnStat and php-gd « Tournas Dimitrios - November 27, 2010

[…] My previous article demonstrated how to install the php-gd graphics library on a CentOs 5 box . Lets create a web-based bandwidth monitoring tool that integrates php-gd and the linux command vnstat […]

2. Generate QR Codes with PHP « Tournas Dimitrios - November 2, 2012

[…] just run the phpinfo()  script in your browser . Installing the library is just one line of code , read my article […]

3. youtube.com - January 16, 2013

We stumbled over here from a different page and thought I might check things out.
I like what I see so now i’m following you. Look forward to checking out your web page again.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s