Composer: Difference between revisions

From Corat Coret
(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...")
 
 
Line 23: Line 23:
sudo mv composer.phar /usr/local/bin/composer
sudo mv composer.phar /usr/local/bin/composer
</syntaxhighlight>
</syntaxhighlight>
=Referensi=
* [https://getcomposer.org/download/ Composer Download]

Latest revision as of 16:10, 18 June 2024

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

Referensi