Friday, March 21, 2014

Installing Laravel 4 in Ubuntu Server with PHP 5.5


Today we are going to learn how to install Laravel 4 with PHP 5.5 on Ubuntu Server from cero.

1) Adding a repository

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5

2) Updating repositories

sudo apt-get update
sudo apt-get upgrade

3) Installing PHP 5.5

sudo apt-get install php5 php5-mcrypt
php -v

PHP 5.5.9-1+sury.org~precise+1 (cli) (built: Feb 13 2014 15:53:53)
(Optional)
sudo apt-get install php5-gd php5-curl php5-cli php5-cgi php5-dev
4) Enable Apache mod_rewrite to use Laravel pretty URL's

sudo e2enmod rewrite
sudo apache2 restart

5) Installing Composer

curl -sS https://getcomposer.org/installer | php
sudo mv composer.phar /usr/local/bin/composer

6) Installing Laravel in your desired folder (Ex. /var/www/projectname)

composer create-project laravel/laravel projectname

7) Setting up the permisions

chmod -R 775 /var/www/projectname/app/storage

8) Setting up Apache. Edit /etc/apache2/sites-available/default for example and set your configuration. 
sudo service apache2 reload

Hope help!




No comments:

Post a Comment