Linux-CentOS7.6安装composer及简单使用说明

Linux-CentOS7.6安装composer及简单使用说明

确保已经安装了PHP

/usr/local/php72/bin/php -v
ln -s /usr/local/php72/bin/php /usr/local/bin/php

php -v

下载composer

cd /usr/local/bin/
wget https://getcomposer.org/download/1.8.4/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
©️2020 CSDN 皮肤主题: 大白 设计师:CSDN官方博客 返回首页