1.下載composerphp
curl -sS https://getcomposer.org/installer | php
ps:若是出現php沒法運行的狀況,請先把PHP加入環境變量,具體操做參考《centOS安裝PHP》html
2.移動或複製composer到環境下可執行composer
cp composer.phar /usr/local/bin/composer
3.測試看是否安裝成功curl
composer -V
ps:若是出現Do not run Composer as root/super user! 請切換用戶運行 測試