1、下载Composer
curl -sS https://getcomposer.org/installer | php
2.设置环境变量
mv composer.phar /usr/local/bin/composer
3.修改权限,否则执行的时候会报错
chmod -R 777 /usr/local/bin/composer
4.composer -v 查询是否安装成功
如果安装过程中出现Failed to decode zlib stream错误信息
执行以下命令
yum install epel-release
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum update