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

How to install Composer on Linux

藏色散人
Release: 2019-10-31 16:08:10
forward
2721 people have browsed it

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');"
Copy after login

2. Execute the installation process

php composer-setup.php
Copy after login

3. Delete the installation script

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

4. Global installation

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

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!

Related labels:
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Issues
Composer failed to install TP51
From 1970-01-01 08:00:00
0
0
0
PHP study installation composer cannot be used
From 1970-01-01 08:00:00
0
0
0
php - Error using composer
From 1970-01-01 08:00:00
0
0
0
ThinkPHP Why use composer?
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template