版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/YuYan_wang/article/details/80038840
Windows 安装
1、下载并安装Composer(https://getcomposer.org/Composer-Setup.exe)
2、在cmd命令行中输入composer命令,如果输出正确的结果表示composer安装成功。
Linux 安装
1、执行如下命令(安装composer):
curl -sS https://getcomposer.org/installer | php
注意: 如果上述方法由于某些原因失败了,你还可以通过 php >下载安装器:
php -r "readfile('https://getcomposer.org/installer');" | php
可以通过 --install-dir 选项指定 Composer 的安装目录
curl -sS https://getcomposer.org/installer | php -- --install-dir=/home
2、可以执行如下命令让 composer 在你的系统中进行全局调用:
mv composer.phar /usr/local/bin/composer
3、验证安装是否成功,执行如下命令
[root@localhost]# composer