Cara install Composer di Linux

Karena sesuatu hal maka saya terpaksa menonaktifkan forum Servernesia sementara dan mengganti enginenya dari XenForo ke Flarum. Dan sampai saat ini proses instalasi Flarum ini tidak bisa klik – klik seperti CMS umumnya, perlu satu komponen vital bernama Composer yang saya pahami ini package management untuk PHP.

Langsung saja eksekusi perintah ini untuk mendownload installernya, memasang dalam Linux dan mengasosiasikan perintah composer:

curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

Log proses pemasangannya:

All settings correct for using Composer
Downloading...

Composer (version 1.4.1) successfully installed to: /usr/local/bin/composer
Use it: php /usr/local/bin/composer

Jadi nanti anda bisa mengeksekusi perintah composer langsung tanpa perlu lokasi lengkapnya.

composer

Seperti ini tampilannya kalau dieksekusi tanpa parameter:

   ______
  / ____/___  ____ ___  ____  ____  ________  _____
 / /   / __ \/ __ `__ \/ __ \/ __ \/ ___/ _ \/ ___/
/ /___/ /_/ / / / / / / /_/ / /_/ (__  )  __/ /
\____/\____/_/ /_/ /_/ .___/\____/____/\___/_/
                    /_/
Composer version 1.4.1 2017-03-10 09:29:45

Usage:
  command [options] [arguments]

Options:
  -h, --help                     Display this help message
  -q, --quiet                    Do not output any message
  -V, --version                  Display this application version
      --ansi                     Force ANSI output
      --no-ansi                  Disable ANSI output
  -n, --no-interaction           Do not ask any interactive question
      --profile                  Display timing and memory usage information
      --no-plugins               Whether to disable plugins.
  -d, --working-dir=WORKING-DIR  If specified, use the given directory as working directory.
  -v|vv|vvv, --verbose           Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Kalau muncul pesan peringatan:

Do not run Composer as root/super user! See https://getcomposer.org/root for details

Maksudnya sederhana, nanti setiap file dan direktori yang dibuat oleh composer akan menggunakan dan dimiliki oleh root. Akan jadi masalah kalau file/direktori tersebut akan dimodifikasi pleh proses lainnya, misal web server seperti Apache/Nginx karena jelas kalah hak aksesnya.

Sekarang saya sedang melakukan migrasi XenForo > MyBB > Flarum. Semoga saja lancar. 😀

Tinggalkan Balasan

Alamat email Anda tidak akan dipublikasikan. Ruas yang wajib ditandai *