Home >Development Tools >composer >How to install composer under linux and change the source
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
Send to global
cp ./composer.phar /usr/local/bin/composer
Add execution permissions to composer
chmod a+x /usr/local/bin/composer
Detection
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!