In this tutorial, we will show you how to install Laravel in ubuntu using Composer. Then you can easily install Laravel in ubuntu 16.04, ubuntu 18.04, and ubuntu 19.04 versions. Here you can also install Laravel 6 using the Composer command.
We will give you step by step instructions on how to install Laravel in ubuntu OS.
First of all, you can see some basic information about Laravel here, so let’s see.
What is Laravel
Laravel is produced by Taylor Ottwell. Laravel is a free open source PHP framework based on MVC patterns. It provides expressive and elegant syntax that helps us build an amazing web application easily and quickly.
Now you can follow these steps.
In this step, You need to install the composer. Because you must have to install the composer in the ubuntu system. So we can install composer in our ubuntu system by using the following command:
curl -sS https://getcomposer.org/installer | php sudo mv composer.phar /usr/local/bin/composer sudo chmod +x /usr/local/bin/composer
At this point, you must have some basic requirements for the Ubuntu system. so you can see bellow basic requirements as listed below.
PHP >= 7.2.0 BCMath PHP Extension Ctype PHP Extension JSON PHP Extension Mbstring PHP Extension OpenSSL PHP Extension PDO PHP Extension Tokenizer PHP Extension XML PHP Extension
Read Also: How To Use MySQL With View In Laravel
In this step, you can run the bellow command to install the Laravel project in your ubuntu system. Let’s run bellow command.
composer create-project --prefer-dist laravel/laravel blog
If you have any permission issue then you can allow your storage folder as bellow.
sudo chmod -R 777 storage sudo chmod -R 777 bootstrap
Now you are ready to run the project using the serve command.
php artisan serve
You can open the URL bellow.
Read Also: How To Setup Dynamic Cron Job In Laravel
I hope it will help you…