sudo a2enmod rewrite
sudo apt-get install php5-gd
sudo yum install php-gd
sudo apt-get install php5-mcrypt