Log in to your Managed Hosting Server via SSH.
Create your .bashrc
:
touch .bashrc
Add these two lines to the .bashrc
:
alias php7cli='/usr/local/bin/php7-71LATEST-CLI'
alias composer='php7cli ~/composer.phar'
Reload .bashrc with
$ source .bashrc
Install Composer with
$ curl -sS https://getcomposer.org/installer | php7cli
Done.
Check the installation with
$ composer --version
You should see something like this:
Composer version 1.7.3 2018-11-01 10:05:06
Your version will probably differ.
By following you get latest 1.x version
curl -sS https://getcomposer.org/installer | php7cli -- --1
And for 2.x you either skip version or pass --2
curl -sS https://getcomposer.org/installer | php7cli -- --2