Composer PHP era (Chinese mirror acceleration)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.