Introduction
This article explains how to install and configure composer.
Installation
For installation steps, please refer to composer’s Chinese documentation. Enter curl -sS https://getcomposer.org/installer | php
. After the download is completed, mv composer.phar /usr/local/bin/composer
can be called globally
An interlude. An error occurred the first time I executed it. It turns out that openssl was not turned on when compiling php. After referring to this article, I found that it still didn’t work! I continued to search for information, but still to no avail. This is not easy to solve. I suddenly thought that the php.ini configuration file did not take effect. This is really the problem. The php.ini file location displayed in phpinfo()
is not the php.ini location that I modified. Well, just cp
and go there.
Modify the Chinese image
After changing to the Chinese image, the speed will be very fast. Refer to the article and enter composer config -g repo.packagist composer https://packagist.phpcomposer.com
.