Install or setup Laravel 5 Framework in Ubuntu 16.04/14.04 for Apache server with the help of Composer:

Laravel is a free, open-source and PHP web development framework which employs the Model-View-Controller design pattern and easy development of applications.




So if you beginner in PHP development and thinking to start any PHP framework then I would suggest only Laravel. Laravel is best PHP framework to start with for experience developer also. Laravel code structure flow also documented very easy.
Topic which are covered here:

Here Laravel installation process will be workout for ubuntu 15.04 LTS, 14.04 LTS, 12.04 LTS, Debian and LinuxMint operating systems.

Now let see how  to configure or install Laravel 5 in Ubuntu apache server .

Before installation of Laravel:
Before proceeding with the Laravel installation, Important thing is to make sure your sources, libraries , packages and applications are all updated. Please try below command for updating our existing resources.

For installation of Laravel 5 in Ubuntu apache server , there are simple steps you need to follow which We have mentioned below.

Steps to install and configure Laravel 5 in Ubuntu apache server:

Step 1:-  LAMP Installation on Ubuntu OS

To start with Laravel framework, we first need to install or set up LAMP server in Ubuntu. If you have already installed LAMP stack server in your system then skip this step else use below commands to set up lamp on Ubuntu system.

==> Installation of PHP5 in ubuntu

For Laravel, Need to install PHP 5 along with its several extra packages by below commands:

==>Installation of  Apache server 

Here we need to install Apache server for creating development environment for developers.Below command will help to install apache 2. And in command “libapache2-mod-php5” package help to link between apache and PHP.

==> Install MySQL in Ubuntu OS
Here need to install MySQL also for your Database cofiguration in Laravel stack.

Step 2:-   Install Composer in ubuntu 

To start with Laravel installation, Need to install Composer first. It is a tool for dependency management in PHP. To install Laravel and all its dependencies, Composer is required. It will download and install all packages, which are required to run Laravel easily.

To install Composer, Use the below commands to download & configure composer in your ubuntu system.

Above command will use to download composer.phar package to system directory.
As we need to run globally Composer so we required to move composer.phar file to /usr/local/bin directory by below command .So that we can run composer from any directory.

Step 3:-   Install Laravel in Ubuntu OS

To download latest version of Laravel, Move to the public html directory on your system. Since we are on Ubuntu with Apache server, we would install Laravel in /var/www/html directory.

The above second command will create a YourProjectName directory with laravel installation done with it And Composer uses git to download and install all the required packages and modules or laravel.

Here you can rename your file name from YourProjectName to LaravelProject.Now Laravel installation is done.Please go to next step to configure apache setting according to laravel dependencies.

Step 4:-  Apache setting configuration changes

Now need to assign www-data group to yourProjectName file and give to proper permission to yourProjectName directory.

Step 5 :-  Create Apache VirtualHost

Now add a Virtual Host changes in your Apache configuration file to access Laravel framework from web browser.Now go to the /etc/apache2/sites-available directory to creat a configuration file “laravel.conf” by below commands.

Now edit this config command by VIM command by below command:

Now add the paste below content to new config file and close it after saving this changes.

Now you have to enable this newly created .conf file by a2ensite . mod_rewrite also required to enable for redirect one URL to another URL properly.

Once you enable this config file by a2ensite, System would ask to restart to update your changes by below commands

Step 6:-  Host file configuration

At this point you have done with installation of Laravel 5 PHP framework on your system.
Now need to make a new entry to hosts file for mapping IP (127.0.0.1)with virtual server name to access in web browser.

laravel.com (virtual domain) is now configured with apache.

Step 7:- Final conclusion of all steps

Your Laravel framework installation is now successfully completed.
So now visit http://laravel.com to access your laravel project. If successful installed then you should see the below screen.Thanks
how to install Laravel 5 Framework in Ubuntu for Apache server

You can also see:
<<<<<Top PHP Interview questions and answers

<<<<< Import and export database in MySql through command line in linux

<<<<< PHP tutorial for beginner Day 4 –  Echo and Print operation in PHP

<<<<< PHP tutorial for beginner Day 3 –  variable scope and type of variable

<<<<< PHP tutorial for beginner Day 2 – Syntax overview and tag

<<<<< PHP tutorial for beginner Day 1 – Introduction and Installation.