Saturday, 11 January 2020

Installing composer in Ubuntu / Linux

Step 1: sudo apt-get remove composer
Step 2: php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
Step 3: php -r "if (hash_file('sha384', 'composer-setup.php') === 'baf1608c33254d00611ac1705c1d9958c817a1a33bce370c0595974b342601bd80b92a3f46067da89e3b06bff421f182') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Step 4: php -r "unlink('composer-setup.php');"

Step 5: sudo service apache2 restart
Step 6: System restart 

No comments:

Post a Comment