1, installation Composer Online has a lot of installation tutorials, here on the global installation
- S S Https://getcomposer.org/installer | php$ MV Composer.phar/usr/local/bin/composer
2, modify the configuration, using the Chinese image first find the config file
$ sudo composer Config-l-G
Modifying a configuration file
$ sudo vim/root/.composer/config.json
Add Mirror Address
{" repositories": [ {"type": "Composer", "url": "http://pkg.phpcomposer.com/repo/packagist/"}, {" Packagist ": false}" }
Modify complete, save exit
3. Update composer
$ composer Self-update
4. Create your own composer project
# Create project directory $ mkdir project$ CD project# add dependencies to the Swoole_framework framework package, and of course it can be other packages $ composer require "Matyhtf/swoole_framework: Dev-master "
5. Create your own dependency package first register an account on https://packagist.org packgist support GIT/SVN/HG 3 versions of control
Packagist will automatically detect the project address under the Composer.json file, and then help you upload to its server, very simple upload up, you can rely on their own expansion package
Reference links
http://www.phpcomposer.com/
http://pkg.phpcomposer.com/
https://packagist.org/
Composer PHP era (Chinese mirror acceleration)