Home  >  Article  >  Development Tools  >  Install Composer on Linux

Install Composer on Linux

藏色散人
藏色散人Original
2019-11-05 13:31:542439browse

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

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: 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

composer Introduction:

Composer is a dependency management tool for PHP5.3 and above. It allows you to declare the code libraries your project depends on and it will install them for you in your project. Composer is not a package manager. Yes, it involves "packages" and "libraries", but it's managed on a per-project basis, with installations in some directory within your project (e.g. vendor). By default it won't install anything globally. So this is just a dependency management.

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

Statement:
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