Composer 是 PHP5.3以上 的一个依赖管理工具。它允许你声明项目所依赖的代码库,
它会在你的项目中为你安装他们。Composer 不是一个包管理器。
是的,它涉及 "packages" 和 "libraries",但它在每个项目的基础上进行管理,在你项目的某个目录中(例如 vendor)进行安装。
默认情况下它不会在全局安装任何东西。因此,这仅仅是一个依赖管理。
linux 或者 Ubuntu系统安装下载Composer:
Step 1:进入安装目录
cd /usr/local/bin
Step 2:下载并安装
sudo curl -s https://getcomposer.org/installer | sudo php
Step 3:添加执行权限
sudo chmod a+x composer.phar
Step 4:加入全局命令:
mv composer.phar /usr/local/bin/composer
Step 5:更新,查看版本号
sudo composer self-update
查看版本号
composer --version