【linux命令】在Linux (centos)中全局安装php工具 composer
内容摘要
[[email protected] ~]# curl -sS /d/file/p/20221029/installer | php
All settings correct for using Composer
Downloading 1.2.2...
Composer successfully inst
All settings correct for using Composer
Downloading 1.2.2...
Composer successfully inst
文章正文
[[email protected] ~]# curl -sS /d/file/p/20221029/installer | php All settings correct for using Composer Downloading 1.2.2... Composer successfully installed to: /root/composer.phar Use it: php composer.phar
2,移动命令至/usr/local/bin/或设置path都可以。
我们这里采用移动文件至/usr/local/bin/:
[[email protected] ~]# mv composer.phar /usr/local/bin/composer [[email protected] ~]# composer -V Do not run Composer as root/super user! See /d/file/p/20221029/how-to-install-untrusted-packages-safely.md for details Composer version 1.2.2 2016-11-03 17:43:15
也可以尝试composer.phar 改名以后将所在路径设置到/etc/profile。看个人习惯。
代码注释
[!--zhushi--]