Steps to Install Laravel on Linux Mint 18.3

Laravel is a very popular free, open source PHP framework created by Taylor Otwell and is intended to make it easy to build web applications by following a model-view-controller (MVC) architecture.

In this paper, I want to share a guide how to install Laravel steps in Linux Mint. Hopefully this article is easy to understand especially for readers who want to learn PHP web programming using Laravel Framework.

1. System Update

Before starting, we make sure first if our Linux has been updated

to check and update the system we can use apt update command,

$ sudo apt update

2. Install Package Dependencies and Composer

The next step I used to do to install laravel to web server-I use
lampp-, is to install the Composer app. The name of this latter app (Composer), I will later make a bridge to download Laravel to the web server -If you have not installed xampp on Linux, follow the tutorial how to install xampp here -.

To download Composer we need curl, and we also need php7.0-cli to install and run Composer. In addition to these two packages we also need Git which will be used by Composer to download dependencies. The three packages I mentioned above can be installed simultaneously by typing this command in the terminal:

$ sudo apt-get install curl php7.0-cli git

then install the php dependencies that will be needed to run Laravel

$ sudo apt install php-mcrypt php-gd php-mbstring php-xml

Since we have installed the curl, we will now call it to install the composer.

$ curl -sS | sudo php – -install-dir = / usr / local / bin -filename = composer

The above command to download and install Composer in / usr / local / bin.

The output will look like this:

To test whether the Composer install has been successful, please type the command running Composer

$ composer

If you get a more or less similar look like this, it means that Composer has been successfully installed on your system.


3. Install Laravel Through Composer

After Composer successfully installed, the next step is to install Laravel through the Composer that we have installed. The trick is very easy, first move to the htdocts folder (if using Xampp), then type the command to create a new folder in which Laravel will be loaded, by typing the create-project composer in the terminal:

$ sudo composer create-project laravel / laravel try

* This may take a long time

4. Run Artisan Serve

If the Laravel install is complete, now go to the “try” folder we created earlier, and run the command

$ php artisan serve

Type the server address in the browser to open the “try” Larvel page.