On CentOS 7, I installed PHP 7.1.
Then I installed composer with:
cd /tmp curl -sS https://getcomposer.org/installer | php71 --> used php71 inste
This worked for me [Centos 7 with php 7.1] : yum install php71w-cli