linux php上安装composer

 
  

[root@centos mf]#  curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
All settings correct for using Composer
Downloading...


Composer successfully installed to: /home/wwwroot/default/mf/composer.phar
Use it: php composer.phar
[root@centos mf]# composer
-bash: composer: command not found
[root@centos mf]# php composer.phar 
   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/



如果需要移植到全局


[root@centos mf]# mv composer.phar  /usr/local/bin/composer
[root@centos mf]# cd ..
[root@centos default]# composer



你可能感兴趣的:(php)