Home  >  Article  >  Development Tools  >  How to install Composer on Linux

How to install Composer on Linux

藏色散人
藏色散人forward
2019-10-31 16:08:102567browse

The following is a tutorial column by composer to introduce to you how to install Composer on Linux. I hope it will be helpful to friends who need it!

How to install Composer on Linux

1. Download the installation script - composer-setup.php - to the current directory

php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"

2. Execute the installation process

php composer-setup.php

3. Delete the installation script

php -r "unlink('composer-setup.php');"

4. Global installation

sudo mv composer.phar /usr/local/bin/composer(ubuuntu:/usr/bin/composer)

Note: Make sure that php is installed correctly before installation (check: php -v to view the version number) , keep the composer version updated with the command: composer selfupdate

For more composer-related technical articles, please visit the composer command usage tutorial column!

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

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