Laravel is a popular PHP framework that is known for its ease of use and powerful features. If you are looking to install Laravel on Ubuntu 24.04, you have come to the right place.
Here is a step-by-step guide on how to install Laravel PHP framework on Ubuntu 24.04:
Step 1: Update your system
Before you start the installation process, you should update your system to ensure that you have the latest software packages. You can do this by running the following commands in the terminal:
sudo apt update
sudo apt upgrade
Step 2: Install PHP
Laravel requires PHP to run, so you will need to install PHP on your system. You can do this by running the following command in the terminal:
sudo apt install php
Step 3: Install Composer
Composer is a dependency manager for PHP that is used to install Laravel and its dependencies. You can install Composer by running the following commands in the terminal:
sudo apt install composer
Step 4: Install Laravel
Once you have installed Composer, you can use it to install Laravel. You can do this by running the following command in the terminal:
composer global require laravel/installer
Step 5: Create a new Laravel project
After you have installed Laravel, you can create a new Laravel project by running the following command in the terminal:
laravel new project-name
Replace “project-name” with the name of your project.
Step 6: Configure your web server
Finally, you will need to configure your web server to serve your Laravel project. If you are using Apache, you can do this by creating a new virtual host file for your project. You can then enable the virtual host and restart Apache by running the following commands in the terminal:
sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/project-name.conf
sudo a2ensite project-name.conf
sudo systemctl restart apache2
If you are using Nginx, you can follow a similar process to configure your server for Laravel.
That’s it! You have successfully installed Laravel PHP framework on Ubuntu 24.04. Now you can start developing your web applications using Laravel. Enjoy!