Home > Development Tools > composer > Can composer be installed independently?

Can composer be installed independently?

爱喝马黛茶的安东尼
Release: 2019-08-21 14:58:26
Original
1467 people have browsed it

Can composer be installed independently?

Composer Installation

Wondows Platform

On the Wondows platform, we only need to download Composer-Setup.exe and install it step by step.

It should be noted that you need to enable openssl configuration. We open php.ini in the php directory and remove the semicolon in front of extension=php_openssl.dll.

Can composer be installed independently?

Related recommendations: "composer usage tutorial"

After successful installation, we can enter composer through the command window (cmd) - -version command to check whether the installation is successful:

Can composer be installed independently?

Next we can change Packagist to the domestic image:

composer config -g repo.packagist composer https://packagist.phpcomposer.com
Copy after login

Linux platform

Linux platform can be installed using the following command:

# php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
# php composer-setup.php
All settings correct for using Composer
Downloading...
Composer (version 1.6.5) successfully installed to: /root/composer.phar
Use it: php composer.phar
Copy after login

Move composer.phar so that composer can make global calls:

# mv composer.phar /usr/local/bin/composer
Copy after login

Switch to domestic mirror:

# composer config -g repo.packagist composer https://packagist.phpcomposer.com
Copy after login

Update composer:

# composer selfupdate
Copy after login

Mac OS system

Mac OS system can be installed using the following command:

$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
$ composer --version
Composer version 1.7.2 2018-08-16 16:57:12
Copy after login

Switch to domestic mirror:

$ composer config -g repo.packagist composer https://packagist.phpcomposer.com
Copy after login

Update composer:

$ composer selfupdate
Copy after login

The above is the detailed content of Can composer be installed independently?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
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