确保已经安装了PHP
7.2位历史版本
/usr/local/php72/bin/php -v
ln -s /usr/local/php72/bin/php /usr/local/bin/php
php -v
下载composer
此处已验证
ln -s /usr/local/php8/bin/php /usr/local/bin/php
cd /usr/local/bin/
wget https://getcomposer.org/download/2.7.1/composer.phar
mv composer.phar composer
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
可执行权限
chmod +x composer
查看版本
composer -V
composer使用说明
安装依赖
composer install
更新依赖
composer update # 更新全部
composer update cuber/lv # 更新指定
更新autoload.files
composer dumpauto
# 或
composer update nothing
未经允许不得转载:lxfamn » composer 安装与使用 cenots9 rocklinux9