Article

Table of Contents
Try Vultr Today with

$50 Free on Us!

Install Composer on Debian

Published on: Tue, Jul 19, 2016 at 12:35 pm EST
Debian Server Apps Web Servers

Introduction

Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.

In this tutorial, we will be outlining the process of installing Composer globally on Debian Linux.

Requirements

  • Debian 6, 7 or 8
  • PHP (including php-cli)
  • Curl

Installation

The Composer installer is a single PHP Script, which makes the process quick and easy. Below are the steps to follow in order to install Composer:

cd /usr/src
curl -sS https://getcomposer.org/installer -o composer-setup.php
php composer-setup.php --install-dir=/usr/local/bin --filename=composer

You can test Composer by running the command below: composer --version

You can also test Composer's functionality by creating a sample Laravel location in your current directory using the command below:

composer create-project --prefer-dist laravel/laravel test

As a result of running the above command, a directory named testshould be created. To ensure that Composer worked as intended, navigate to the directory and confirm that it isn't empty.

This concludes our tutorial, thank you for reading.

Want to contribute ?

You could earn up to $300 by adding new articles