Installing composer

Posted under » PHP » CakePHP on 27 Sep 2018

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. To install. Some software that uses composer are symfony, cakephp and guzzle among others.

In Ubuntu, all you need to do is apt-get install composer. In this doesn't work... try the official documents or below.

curl -sS | php

If you don't have curl, maybe you can install via the command line using bash.

It is useful to go to a good directory before installing. Otherwise you will get this

Composer (version 1.8.0) successfully installed to: /home/lky/www/anoneh/contents/composer.phar
Use it: php composer.phar

Luckily you can move the composer.phar to ~/.local/bin or anywhere you want. If former, can run "composer" in order to run Composer but if later, "php composer.phar".

Update. It's better to install using apt-get. If Centos 7, use this guide.

Once installed, you go to the directory where you see the `composer.json' and then run the `composer install' command to install the dependencies.

web security linux ubuntu GIT svn Raspberry apache mysql php drupal cake symfony javascript Ajax css