Home >Development Tools >composer >How to install composer under linux and change the source

How to install composer under linux and change the source

藏色散人
藏色散人forward
2021-11-23 16:24:062521browse

This article is written by the composer tutorial column to introduce to you how to install composer and change the source under Linux. I hope it will be helpful to friends in need!

Install composer under linux and change the source

First download the composer.phar package to the server, you can use wget, curl, or ftp to upload it

Configure php global variables and test whether composer is normal

How to install composer under linux and change the source

Send to global

cp ./composer.phar /usr/local/bin/composer

Add execution permissions to composer

chmod a+x /usr/local/bin/composer

How to install composer under linux and change the source

Detection

How to install composer under linux and change the source

Configure the source of domestic Alibaba Cloud (global configuration)

composer config -g repo.packagist composer mirrors.aliyun.com/composer/

This ends! >_

The above is the detailed content of How to install composer under linux and change the source. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:juejin.im. If there is any infringement, please contact admin@php.cn delete