composer的安装
作者:互联网
前天装composer的时候,尽然装了许久没有成功,虽然简单,还是记录一下
1.windows下
安装步骤:
直接下载Composer-Setup.exe,双击安装即可使用
注意:
php需要开启openssl扩展,
php版本需要大于5.3.2
将源地址改为国内
composer config -g repo.packagist composer https://packagist.phpcomposer.com
2.linux下
安装步骤:
# php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
# php composer-setup.php
配置全局:
# mv composer.phar /usr/local/bin/composer
切换为国内镜像:
# composer config -g repo.packagist composer https://packagist.phpcomposer.com
升级:
# composer selfupdate
3.mac下
安装步骤:
$ curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
切换为国内镜像:
$ composer config -g repo.packagist composer https://packagist.phpcomposer.com
升级:
$ composer selfupdate
标签:composer,com,phpcomposer,https,packagist,php,安装 来源: https://blog.csdn.net/weixin_41932507/article/details/101060320