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...

10 Kesalahan yang Bikin Karir Stuck 10 Tahun (Dan Cara Menghindarinya!)

Hai teman-teman! 👋 Siapa yang pernah merasa karirnya stuck, gak naik-naik, atau bahkan merasa gak berkembang? 🙋‍♂️ 🙋‍♀️ Saya pernah mengalami hal itu, dan setelah evaluasi, saya menemukan beberapa kesalahan yang sering bikin karir mentok. Tapi tenang, saya juga punya solusinya! Berikut 10 Kesalahan yang Bikin Karir Saya Stuck 10 Tahun (Dan Cara Menghindarinya!): 1. Hanya Fokus pada Tugas Rutin Solusi: Cari peluang untuk proyek baru atau skill baru yang bisa dipelajari. 2. Tidak Punya Mentor atau Role Model Biasanya saat probation kita mendapat senior/atasan yg membimbing kita untuk adaptasi dengan task/pekerjaan kita. Akan tetapi selepas ini biasanya kita sudah dilepas untuk bekerja mandiri. Solusi: Tetap selalu bertanya jika ada kesulitan / sharing pengalaman / ilmu dengan atasan/senior. Jika bisa menjangkau sampai level CEO/direktur akan lebih baik karena dapat memberikan insight untuk perkembangan karir. 3. Gak Pernah Upgrade Skill Meskipun suka mengumpukan tutorial baik dari you...

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....