To use composer, first system must satisfy php environment:
php --version
To install composer, try either:
curl -sS https://getcomposer.org/installer | phpmv composer.phar /usr/local/bin/composeryum install composer
enable packagist repo globally: [its speed seems not fast, but should better than github], global config files are located at ~/.config/composer/
composer config -g repo.packagist composer https://packagist.phpcomposer.com
locally, should have a composer.json first locally:
composer config repo.packagist composer https://packagist.phpcomposer.com
after that, writing the composer.json:
{ "require": { "laravel/framework": "5.0.*", "mews/captcha": "~2.0" }, "minimum-stability": "dev" }
and then install files locally with composer.json:
composer install
some packages needs php7, so in centos we use sclo to install rh-php70, and some packages may also needs extensions like mbstring in php7 version, install them both by searching:
yum list rh-php70* |grep mbstring