Skip to content

Instantly share code, notes, and snippets.

@mosufy
Created September 15, 2014 05:39
Show Gist options
  • Save mosufy/991019d7ab1916c3edcc to your computer and use it in GitHub Desktop.
Save mosufy/991019d7ab1916c3edcc to your computer and use it in GitHub Desktop.
Composer Installation Guide

Install Composer

Composer is a dependency management tool for your PHP projects.

  1. Install PHP5 CLI

     $ sudo apt-get install php5-cli
    
  2. Get the Composer installer

     $ curl -sS https://getcomposer.org/installer | php
    
  3. Move to a global directory so that all projects can simply use the composer install commands

     $ sudo mv composer.phar /usr/local/bin/composer
    

Using Composer

To install dependencies, first go to the project folder

    $ cd /var/www/project
    $ composer install

For existing projects with updated dependencies

    $ composer update
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment