Last active
August 28, 2019 13:19
-
-
Save ZiTAL/4e60f913d3f60416de028ba8aa65abf8 to your computer and use it in GitHub Desktop.
php: composer install globally
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
su | |
cd /tmp | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | |
php -r "if (hash_file('sha384', 'composer-setup.php') === 'a5c698ffe4b8e849a443b120cd5ba38043260d5c4023dbf93e1558871f1f07f58274fc6f4c93bcfd858c6bd0775cd8d1') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" | |
php composer-setup.php | |
php -r "unlink('composer-setup.php');" | |
mv composer.phar /usr/local/bin/composer | |
chmod +x /usr/local/bin/composer | |
cd - | |
exit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment