Installation of GD Library on Ubuntu Server.

PHP is also be used to create and manipulate image files in a variety of different image formats, including GIF, PNG, JPEG, WBMP, and XPM. PHP can output image streams directly to a browser. You will need to compile PHP with the GD library of image functions for this to work. GD and PHP may also require other libraries, depending on which image formats you want to work with.

Step-1:

Ubuntu (and Debian) Linux comes with the package called php5-gd. Just type the following command to install 
GD library module:

sudo apt-get install php5-gd
gdLibrary1
Step 2:

After finishing installation GD Library restart the apache server by just executing the following command:

sudo /etc/init.d/apache2 restart

gdLibrary2

Step 3:

You can now check the configuration by just putting below code in a file and open it in your browser.

<?php
      phpInfo();
?>


You will see the below output in configuration file. Than means your GD library is now installed and available 
for your use. Be sure to restart the Apache server after installing the GD library otherwise it will not 
available for your use. (we suggested to restart the Apache server on step 2)

gdLibrary3

Bingo!!

Now the GD Graphics Library is installed for your use for dynamically manipulating images. You will need to compile PHP with the GD library of image functions for this to work. If you still faces any issue please report in the comment box and we will solve out you problem.

 

 

Posted in Linux | Tagged , , , , | Comments Off

Comments are closed.