composer installation (China mirror)

WBOY
Release: 2016-07-30 13:29:56
Original
1068 people have browsed it

Reprint address: http://my.oschina.net/igq/blog/312322

1. Install composer. There are many installation tutorials on the Internet. Here is the global installation

$ curl -sS https://getcomposer.org/installer | php $ mv composer.phar /usr/local/bin/composer2. Modify the configuration and use the Chinese mirror First find the config file$ sudo composer config -l -g

composer installation (China mirror)

Modify the configuration file

$ sudo vim /root/.composer/config.jsonAdd the mirror address{ "repositories": [ {"type": "composer", "url": "http://pkg.phpcomposer.com/repo/packagist/"}, {"packagist": false} ] }

Complete modification, save and exit

composer installation (China mirror)

3. Update composer

$ composer self-update

Add this place:

Possibly This problem will occur:


This is due to insufficient permissions. Just one sudo in front of you is enough. Or change the permissions of .composer/.

The above introduces the composer installation (Chinese mirror), including the relevant content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template