Let’s bring Laravel to Ubuntu

Image for post
Image for post
Image Credit: Dribbble

I’m trying to simplify the steps for installation and configuration of Laravel on Ubuntu.

Pre-Requisities

1. Update Sytem

sudo apt-get update 
sudo apt-get upgrade

2. Install/Configure LAMP Stack

apache2 -v
mysql -V
php -v
sudo apt-get install apache2
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
sudo apt-get install php5 libapache2-mod-php5 php5-mcrypt unzip curl openssl

3. Install Composer (Globally)

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

4. Activate mod_rewrite module

sudo a2enmod rewrite
sudo service apache2 restart

Install Laravel (via composer)

cd /var/www/html
sudo composer create-project laravel/laravel project-name — prefer-dist
Image for post
Image for post

Final Configuration

sudo chgrp -R www-data /var/www/html/project
sudo chmod -R 775 /var/www/html/project/storage
Image for post
Image for post
cd /etc/apache2/sites-available
sudo nano laravel.conf
https://gist.github.com/realvjy/1fb5a1945a9304b2e0869088ada31c55
sudo a2dissite 000-default.conf
sudo a2ensite laravel.conf
sudo service apache2 restart
Image for post
Image for post

Ready to go

Image for post
Image for post

Written by

Principal Product Designer @zomato | Maker of illlustrations.co uiprint, designletter, sushi design | Making Open Design System

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store