如何安装composer
来源:互联网 发布:linux怎么复制文件命令 编辑:程序博客网 时间:2024/05/24 06:15
官网地址
Windows Installer
The installer will download composer for you and set up your PATH environment variable so you can simply call composer
from any directory.
Download and run Composer-Setup.exe - it will install the latest composer version whenever it is executed.
Command-line installation
Run this in your terminal to get the latest Composer version:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"php composer-setup.phpphp -r "unlink('composer-setup.php');"
This installer script will simply check some php.ini settings, warn you if they are set incorrectly, and then download the latest composer.phar in the current directory. The 4 lines above will, in order:
- Download the installer to the current directory
- Verify the installer SHA-384 which you can also cross-check here
- Run the installer
- Remove the installer
WARNING: Please do not redistribute the install code. It will change with every version of the installer. Instead, please link to this page or check how to install Composer programmatically.
Installer Options
--install-dir
You can install composer to a specific directory by using the --install-dir
option and providing a target directory. Options must be appended to --
so that PHP ignores them, like -- --install-dir=bin
, example:
php composer-setup.php --install-dir=bin
--filename
You can specify the filename (default: composer.phar) using the --filename
option. example:
php composer-setup.php --filename=composer
--version
You can install composer to a specific release by using the --version
option and providing a target release. example:
php composer-setup.php --version=1.0.0-alpha8
Preview / Snapshot Releases
By default the installer and composer self-update
will download stable versions only. If you would like to help test pre-release versions you can use the --preview
flag on either installer or self-update. For snapshot builds which are done from the latest Composer commit, you can use the --snapshot
flag.
- 如何安装composer
- 如何安装 Composer
- 如何安装Composer
- 如何安装 Composer
- 安装composer失败如何解决。
- 如何查看composer安装路径,全局使用composer
- Windows环境下如何安装Composer?
- 如何在window下安装composer
- 如何在Linux上安装Composer
- CentOS 7 下如何安装使用Composer
- composer安装
- composer安装
- composer安装
- composer安装
- composer 安装
- composer安装
- Composer安装
- composer安装
- 第二个JAVA程序:在屏幕上打印*
- 第五周项目四 数制转换
- 移动端字体viewPort
- 第五周项目五 后缀表达式
- 面试题-内存管理(MRC)
- 如何安装composer
- 轻量级分布式 RPC 框架(续)
- web前端面试题(HTML&CSS)上 答案详解
- C/C++中strcpy和strncpy的区别
- in 和 exist 区别
- VS2010附加目录宏
- 电路板绘制经验积累
- 关于c#文件操作Streamwriter,streamreader的使用
- Fragment重影以及调用getActivity为null解决