Difference between revisions of "How to Install GD for PHP on CentOS 6"
From Acenet Knowledgebase
Docs admin (Talk | contribs) (Created page with "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 br...") |
Docs admin (Talk | contribs) |
||
Line 19: | Line 19: | ||
<syntaxhighlight lang="bash">php -m | grep -i gd</syntaxhighlight> | <syntaxhighlight lang="bash">php -m | grep -i gd</syntaxhighlight> | ||
− | Here's example | + | Here's example output showing GD has been installed: |
<syntaxhighlight lang="bash">[root@vps ~]# php -m | grep -i gd | <syntaxhighlight lang="bash">[root@vps ~]# php -m | grep -i gd | ||
gd | gd | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 18:09, 4 December 2012
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
gd