Home > Development Tools > composer > The ultimate solution: Solve the problem of Composer installation being too slow

The ultimate solution: Solve the problem of Composer installation being too slow

藏色散人
Release: 2020-06-16 13:46:45
forward
4029 people have browsed it

The following tutorial column of composer will introduce to you the method to solve the problem of Composer installation being too slow. I hope it will be helpful to friends in need!

The ultimate solution: Solve the problem of Composer installation being too slow

Essential tools: ssr

Many people encounter very slow speeds when using composer to download packages, and basically cannot Regarding the usage problem, most of the solutions on the Internet suggest changing the Chinese image, but it is still very difficult to use.

1. Set composer to the original mirror addresscomposer config -g repo.packagist composer https://packagist.phpcomposer.com

2. Configure ssr LAN proxy

ssr > Option Settings > Check 'Allow connections from LAN' under Local Agent

Option Settings> Local Port>1088

In order to ensure If the configuration is successful, it is recommended to change the port number to port 1088 as an example

3. Configure the proxy in the cmd command line

set http_proxy=http://127.0.0.1:1088
set https_proxy=http://127.0.0.1:1088
Copy after login

4. Use cmd curl to test whether the configuration is successful

Be careful not to use ping without curl. Go to the official website to download and decompress

Because ping does not use the tcp protocol, the proxy does not take effect

curl https://www.youtube.com
Copy after login

If there is a return, the configuration is successful

5. Now execute composer install and enjoy the speed~

For more composer technical articles, please visit the composer column!

The above is the detailed content of The ultimate solution: Solve the problem of Composer installation being too slow. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
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