Home >Development Tools >composer >Share 2 ways to install composer under centos

Share 2 ways to install composer under centos

藏色散人
藏色散人forward
2020-12-14 14:36:571652browse

The tutorial column of composer below will introduce you to two installation methods of composer under centos. I hope it will be helpful to friends in need!

Share 2 ways to install composer under centos

Two installation methods for composer under centos

1. Download the composer.phar file

curl -sS https://getcomposer.org/installer | php

Move composer.phar to the environment variable and renamed composer

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

Use domestic mirror

composer config -g repo.packagist composer https://packagist.phpcomposer.com

2,

wget https://dl.laravel-china.org/composer.phar -O /usr/local/bin/composer
chmod a+x /usr/local/bin/composer

The above is the detailed content of Share 2 ways to install composer under centos. For more information, please follow other related articles on the PHP Chinese website!

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