Composer installation, composer

Source: Internet
Author: User

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.pharTo 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 variablesPATHIn the command line window, you can directly executecomposerCommand.

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:\binAdd pathPATHEnvironment variable. Finally, open a command line window and try again.composer --versionCheck whether the version number is correctly output, for example :.

Composer version 1.0-dev (72cd6afdfce16f36a9fd786bc1b2f32b851e764f) 2015-12-28 17:35:19

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.