Home>Article>Development Tools> How to install composer on centos7

How to install composer on centos7

藏色散人
藏色散人 forward
2021-05-12 11:49:31 2733browse

The following tutorial column will introduce how to install composer on centos7. I hope it will be helpful to friends who need it!

How to install composer on centos7

url -sS getcomposer.org/installer | php

Set environment variables after downloading

mv composer.phar /usr/local/bin/composer

Modify permissions, otherwise an execution error will occur

chmod -R 777 /usr/local/ bin/composer

Then enter the command, and the following picture will be displayed, indicating that the installation is successful

composer -vUse Ali mirror

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

Cancel configuration and restore to default address

composer config -g –unset repos.packagist

View global settings: composer config -gl

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

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