FahmidasClassroom

Learn by easy steps

Laravel Ubuntu

Laravel is a very popular PHP framework to develop different types of web applications. The Linux users require to install some packages before creating a new Laravel project. The way of creating the Laravel project on the Ubuntu operating system has been shown in this tutorial. Follow the following steps to install Laravel 9 on Ubuntu.

Pre-requisites:

You have to install apache2, mysql-server, mysql-client and PHP before starting the steps of this tutorial.

Steps:

1. Run the following command to update the system.

$ sudo apt update

2. Run the following command to download the composer that will be used to install Laravel.

$ wget -O composer-setup.php https://getcomposer.org/installer

3. Run the following commands to install the composer.

$ sudo php composer-setup.php --install-dir=/usr/local/bin –filename=composer
$ sudo apt install composer

4. Run the following command to install necessary PHP packages. You have to check the ilocalhost:nstalled PHP version and use your PHP version number for installing php-curl package.

$ sudo apt-get install php-xml php-mbstring php8.0-curl

5. Run the following command to update composer.

$ composer update

6. Run the following command to check the installed version of the composer.

$ composer --version

7. Run the following command to create a laravel project named test

composer create-project laravel/laravel test

8. Go to the project folder

$ cd test

7. Run the Laravel development server

$ php artisan serve

8. Open the following URL from the browser.
http://127.0.0.1:8000