安裝 PHP 軟體包管理系統 Composer for CentOS

Composer

Composer 是一套 PHP 的軟體包管理系統,它可管理 PHP 軟體和依賴庫的關係。這裡說明如何在 CentOS 作業系統安裝 Composer。

下載和安裝

下載並安裝 Composer

curl -sS https://getcomposer.org/installer | php
All settings correct for using Composer
Downloading...

Composer (version 1.10.13) successfully installed to: /root/composer.phar
Use it: php composer.phar

設定

將下載的 composer.phar 移至環境下,並更名為 composer,即可執行指令 composer

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

查看 Composer 版本,確認已正確安裝:

composer -V
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Composer version 1.10.13 2020-09-09 11:46:34

發表留言