Skip to main content

Cara Install Composer di Linux

! Requirements:
  • Pastikan sudah menginstall PHP versi 5.3.2 ke atas di Linux. Jika belum baca lebih dulu: Cara Install PHP di Linux.
  • Pastikan komputer terkoneksi dengan internet



Langkah pertama, eksekusi installer di terminal:


1. php -r "readfile('https://getcomposer.org/installer');" > composer-setup.php
2. php -r "if (hash('SHA384', file_get_contents('composer-setup.php')) === '7228c001f88bee97506740ef0888240bd8a760b046ee16db8f4095c0d8d525f2367663f22a46b48d072c816e7fe19959') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
3. php composer-setup.php
4. php -r "unlink('composer-setup.php');"
 
Penjelasan dari eksekusi di atas adalah:
baris 1: download installer composer ke local
baris 2: verifikasi installer dengan SHA-384
baris 3: menjalankan installer
baris 4: menghapus installer

Langkah kedua, deklarasi sebagai perintah global:

setelah berhasil menginstal compser, kita perlu mendeklarasikan composer sebagai perintah global, agar saat menginstall paket seperti laravel framework, dll yang menggunakan composer kita cukup mengetikkan perintah "composer --diikuti perintah instalasi paket" di terminal. caranya adalah:

ketikkan perintah berikut di terminal (pastikan anda tidak berpindah direktori setelah melakukan instalasi composer di atas)

mv composer.phar /usr/local/bin/composer
 
Selesai..
 
Sekarang cobalah melakukan instalasi paket laravel di terminal yang sama:
 
 
composer global require "laravel/installer"
 
  
Selamat mencoba.

Comments

Popular posts from this blog

Create API Service with Lumen 5.2

Useful Tools: 1. APIDOC (Inline Documentation for RESTful web APIs) npm install -g apidoc 2. Project Preparation : Getting Lumen Installer  composer global require "laravel/lumen-installer"  3. Project Initialization lumen new blog that command will install a startup project in folder "blog" with latest Lumen version. As a note, this will require latest PHP version also. If you have old php version installed on your server and don't want to upgrade, you can use older version of lumen for example is version 5.2 which still able to use PHP 5.5x. composer create-project laravel/lumen blog "5.2" Check the latest installation requirements based on Lumen and its version here:  https://lumen.laravel.com/docs/installation  4. Route Use prefix "api" $app->group(['namespace' => "App\Http\Controllers", 'prefix' => 'api'], function($app){     $app->get('/lessons', 'LessonsCon...

Google Announces Coding Competitions Farewell

This year, 2023, Google announces the ending of Google Competition (CodeJam) after running it for 20 years. Google CodeJam is the place where young / new software engineer practice their skills to step up into professional engineer. It was very prestige competition since it held by Google, one of the biggest IT company in the world and also comes with interesting prices and opportunities, as we know, from this competition Google also uses it for talents/developers recruitment. But still, there are many coding competition skill you can attend such as: Codechef LeetCode TopCoder GoCoderz CodeGoda by Agoda Those might not giving big prices, perhaps CodeGoda will gives similar type of Google Code Jam since it held by big IT company (Agoda).

Privacy Policy of Simple Confetti App

Privacy Policy Introduction This Privacy Policy describes how FITRA APPS ("we") collects, uses, and discloses your information in connection with your use of our mobile application, Simple Confetti ("App"). Definitions Personal Information: means any information that can be used to identify an individual, such as name, email address, and phone number. Usage Data: means data collected automatically by the App or third-party services used in connection with the App, such as the type of device you use, usage statistics, and browsing history. Information We Collect We collect the following types of information: Personal Information: We didn't collect your personal information. Usage Data: We didn't use your data for sending crash report or other purpose. Sharing of Personal Information We will not share your Personal Information with third-party service providers who assist us in operating the App and providing the services offered through the App....