Composer

From Corat Coret
Revision as of 16:09, 18 June 2024 by Johan Efendi (talk | contribs) (Created page with "=Installasi Linux= Install dulu PHP bila belum ada <syntaxhighlight lang="bash"> sudo apt install php -y </syntaxhighlight> Check versi PHP <syntaxhighlight lang="bash"> php -v </syntaxhighlight> Installasi composer versi terakhir v2.7.7 (per 17/06/2024) <syntaxhighlight lang="bash"> php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c63...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Installasi Linux

Install dulu PHP bila belum ada

sudo apt install php -y

Check versi PHP

php -v

Installasi composer versi terakhir v2.7.7 (per 17/06/2024)

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
php composer-setup.php
php -r "unlink('composer-setup.php');"

Pindahkan composer agar dikenali sebagai global / bukan local user

sudo mv composer.phar /usr/local/bin/composer