# php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');" # php composer-setup.php 移动 composer.phar,这样 composer 就可以进行全局调用: # mv composer.phar /usr/local/bin/composer 转自https://www.runoob.com/w3cnote/composer-install-and-usage.html