How to install Composer on Linux

藏色散人
Release: 2020-03-14 15:23:02
forward
3890 people have browsed it

The following tutorial column of composer will introduce to you how to install Composer on Linux. I hope it will be helpful to friends in need!

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: Before installation, be sure to ensure that php is installed correctly (check: php -v to view the version number), and keep composer Version update command: composer selfupdate

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:
source:segmentfault.com
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!