Installing laravel 5 on Ubuntu 16.04

Share:


Laravel interview questions and answers

Step by Step guide to installing and configuring Laravel 5.4 on Ubuntu 16.04 on AWS via composer. 

Step 1. Checking server requirements To install Laravel 5.4
In order to install Laravel 5.4 your server must meets the following requirements:

  • PHP >= 5.6.4
  • OpenSSL PHP Extension
  • PDO PHP Extension
  • Mbstring PHP Extension
  • Tokenizer PHP Extension
  • XML PHP Extension
Checking PHP version 

To check your PHP version Type below command on your Terminal.
php -version

If you php version is less than 5.6.4 , here are the steps to upgrade your PHP version.
Here are Steps To Upgrade PHP version on Ubuntu 16.04 

Step 2. Checking composer is installed or not.
If it is not installed Kindly run below commands to install Composer Globally on server.
Installing composer globally on Ubuntu 16.04
Please run below commands to install composer.

  php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
  php -r "if (hash_file('SHA384', 'composer-setup.php') ==='669656bab3166a7aff8a7506b8cb2d1c292f042046c5a994c43155c0be6190fa0355160742ab2e1c88d40d5be660b410')
  { echo 'Installer verified'; } else{ echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
  php composer-setup.php
  php -r "unlink('composer-setup.php');"
 

OR


curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer

Laravel interview questions and answers
Step 3. Checking Mbstring PHP Extension is enabled or not

Please run below commands to install Mbstring PHP Extension

sudo apt-get install php7.0-mbstring

Laravel interview questions and answers


Step 4. Installing XML PHP Extension

sudo apt-get install php7.0-xml 

Restarting apache after installation

sudo service apache2 restart 

Step 5. Installing latest laravel Framework. In my case its laravel 5.4.17.

composer create-project laravel/laravel laravelblog 
  
Step 4. Checking installed version of laravel.

php artisan -V 

Step 5. Change storage folder permissions

# Group Writable (Group, User Writable)
$ sudo chmod -R gu+w storage

# World-writable (Group, User, Other Writable)
$ sudo chmod -R guo+w storage

You have done

Now access it from the browser to check http://your-domain.com/laravelblog/public/
In my case I have installed laravel in subdirectory of my website. Here is link
http://onlineinterviewquestions.com/frameworks/laravelblog/public/

Laravel interview questions and answers



Top Laravel Interview questions and answers for Fresher and Experienced

No comments