miércoles, 14 de abril de 2021

Instalar composer en Ubuntu

 


1. Verificar instalación de curl

sudo apt-get install curl

2. Vamos a la carpeta bin

cd /usr/local/bin

3. Todos los siguientes comandos ejecutarlos con sudo

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

 

php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

 

php composer-setup.php

 

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

4. Estando en /usr/local/bin

mv composer.phar composer