How to install Composer?
To install Composer you need to follow these steps: 1) Connect to your hosting account via SSH. SSH access can be found in the hosting service activation letter. 2) Create a new file using a text editor (for example, nano) and name it composer.sh:
nano composer.sh
3) Paste this code into the file:
#!/bin/sh
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php
exit 1
fi
php composer-setup.php --quiet
RESULT=$?
rm composer-setup.php
This script will download the latest version of Composer and perform the installation.
4) Save changes and exit the text editor (for nano, press the key combination CTRL + X, Y and ENTER).
5) Execute the script with the following command:
sh composer.sh
6) The script will not report the execution result. To check the installation is correct, run the command:
./composer.phar