Composer installation, composer
Install Composer using a composer Image
Make sure that PHP is installed correctly.
Local Installation
Partial installation is to install composer to the current directory (for example, to the project root directory), and then you canphp composer.phar
To use composer.
Mac or Linux:Open the command line window and execute the following command:
curl -sS http://install.phpcomposer.com/installer | php
Windows (Mac or Linux ):Run the following command:
php -r "readfile('http://install.phpcomposer.com/installer');" | php
Global Installation
Global installation is to install composer to system environment variablesPATH
In the command line window, you can directly executecomposer
Command.
Mac or Linux:Open the command line window and execute the following command:
curl -sS http://install.phpcomposer.com/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
Windows:Run the following command in the command line:
mkdir C:\bincd C:\binphp -r "readfile('http://install.phpcomposer.com/installer');" | phpecho @php "%~dp0composer.phar" %*>composer.bat
After the preceding command is successfully executedC:\bin
Add pathPATH
Environment variable. Finally, open a command line window and try again.composer --version
Check whether the version number is correctly output, for example :.
Composer version 1.0-dev (72cd6afdfce16f36a9fd786bc1b2f32b851e764f) 2015-12-28 17:35:19