With CentOS 6.5+ and PHP 5.5:
yum install php55u-gd
service httpd restart
If you get an error like: cannot map zero-fill pages: Cannot allocate memory in Unknown on line 0
, it could be because you don't have a swap file. I suggest you take a look at the tutorial mentioned in this answer: https://stackoverflow.com/a/20275282/828366
Tutorial: https://www.digitalocean.com/community/articles/how-to-add-swap-on-centos-6