php7安装composer

下面介绍的是php7安装composer

/root目录下载composer.phar

[root@VM-0-15-centos ~]# curl -sS https://getcomposer.org/installer | php

#把composer.phar转移之bin目录以便全局使用
[root@VM-0-15-centos ~]# mv composer.phar /usr/local/bin/composer
#展示版本信息说明成功
[root@VM-0-15-centos ~]# composer -v

如果出现这个提示,是因为composer不建议root账号运行,可以输入y,或者切换账号

Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? 

posted @ 2021-01-05 12:31  Black_King_Bar  阅读(906)  评论(0编辑  收藏  举报