1.更新apt资源
sudo apt-get update
2.安装composer依赖
sudo apt install wget php-cli php-zip unzip
3.下载composer安装器
wget -O composer-setup.php https://getcomposer.org/installer
4.安装composer到/usr/local/bin目录
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer