Home > Backend Development > PHP Tutorial > composer installation (China mirror)

composer installation (China mirror)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-07-30 13:29:56
Original
1117 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:
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
Latest Issues
Composer failed to install TP51
From 1970-01-01 08:00:00
0
0
0
PHP study installation composer cannot be used
From 1970-01-01 08:00:00
0
0
0
php - Error using composer
From 1970-01-01 08:00:00
0
0
0
ThinkPHP Why use composer?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template