Installing laravel 5.4 on Ubuntu Server

Installing laravel 5.4 on Ubuntu Server
Installing laravel 5.4 on Ubuntu Server

In this post we are going to install Laravel 5.4 on Ubuntu server.Below are 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 server,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, please type below command on your Terminal.

php -version
Checking Php version on Ubnatu server
Checking PHP version on Ubuntu server

On my server PHP 7.0.15 is installed, if your php version is less than 5.6.4 ,then you need to upgrade your
PHP version
You can read the steps to upgrade your PHP version from below link.

Here are Steps To Upgrade PHP version on Ubuntu 16.04 

Step 2.Checking composer is installed or not.

If it is not installed please 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
	
Installing composer on Ubuntu server
Installing composer on Ubuntu server

Step 3. Install Mbstring PHP Extension is not installed

Please run below commands to install Mbstring PHP Extension


 sudo apt-get install php7.0-mbstring
installing Mbstring on Ubuntu server
installing Mbstring on Ubuntu server



Step 4. Installing XML PHP Extension

sudo apt-get install php7.0-xml

Restarting apache after installation of XML & Mbstring PHP Extension

	sudo service apache2 restart 
		

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

		composer create-project --prefer-dist laravel/laravel laravelblog 

Step 6. Checking installed version of laravel.

	php artisan -V 

Step 7. 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 successfully installed and configured Laravel 5.4 on Ubuntu server.

Now access it from the browser to check http://your-domain.com/laravelblog/public/

Successfully Installed Laravel 5.4 on Ubuntu server
Successfully Installed Laravel 5.4 on Ubuntu server

Thanks You!!

2 thoughts to “Installing laravel 5.4 on Ubuntu Server”

  1. I enjoy, result in I discovered exactly what I used to be looking for. You’ve ended my 4 day long hunt! God Bless you man. Have a great day. Bye

Leave a Reply

Your email address will not be published. Required fields are marked *