Current Location: Home> Latest Articles> Installing Composer, Laravel, and Lumen on Ubuntu 14.04: Complete Guide

Installing Composer, Laravel, and Lumen on Ubuntu 14.04: Complete Guide

M66 2025-06-13

1. Installing Composer

Composer is a PHP dependency management tool that helps you manage and install the necessary packages for your projects. Below are the steps to install Composer on Ubuntu 14.04:

1.1 Installing Dependencies

Before you begin, make sure the following packages are installed on your system:

$ sudo apt-get update
<span class="fun">$ sudo apt-get install curl php5-cli</span>

1.2 Downloading the Composer Installation Script

Navigate to any directory and execute the following command to download the Composer installation script:

<span class="fun">$ curl -sS https://getcomposer.org/installer | php</span>

The script will download the Composer.phar file to your current directory.

1.3 Moving Composer.phar to a Global Path

To be able to access Composer from any location, we need to move Composer.phar to a global path:

<span class="fun">$ sudo mv composer.phar /usr/local/bin/composer</span>

Now, you can run the composer command to verify that Composer is successfully installed.

2. Installing Laravel

Laravel is a popular PHP framework that offers elegant syntax and powerful features, making web application development much simpler.

2.1 Creating a Laravel Project

Navigate to the directory where you want to create the Laravel project and execute the following command:

<span class="fun">$ composer create-project --prefer-dist laravel/laravel myproject</span>

The above command will create a Laravel project named "myproject" in your current directory.

2.2 Starting the Development Server

Navigate into the newly created project directory:

<span class="fun">$ cd myproject</span>

Then, run the following command to start the Laravel development server:

<span class="fun">$ php artisan serve</span>

You can now visit http://localhost:8000 to view your Laravel application.

3. Installing Lumen

Lumen is a micro-framework based on Laravel, designed specifically for building microservices and small APIs. Below are the steps to install Lumen on Ubuntu 14.04:

3.1 Creating a Lumen Project

Navigate to the directory where you want to create the Lumen project and execute the following command:

<span class="fun">$ composer create-project --prefer-dist laravel/lumen mylumen</span>

The above command will create a Lumen project named "mylumen" in your current directory.

3.2 Starting the Development Server

Navigate into the newly created project directory:

<span class="fun">$ cd mylumen</span>

Then, run the following command to start the Lumen development server:

<span class="fun">$ php -S localhost:8000 -t public</span>

You can now visit http://localhost:8000 to view your Lumen application.

By following these steps, you have successfully installed Composer, Laravel, and Lumen on Ubuntu 14.04. You can now start using these tools to develop your PHP projects.