centos7安装composer
admin
2023-03-04 16:42:18
0

1.下载composer.phar
// 如果是网络原因失败,多试几次
curl -sS https://getcomposer.org/installer | php

2.把composer.phar移动到环境下让其变成可执行

mv composer.phar /usr/local/bin/composer

3.测试
composer -v

Do not run Composer as root/super user! See https://getcomposer.org/root for details


/ __/_ __ _ ____
/ / /
\/ ` \/ \/ \/
/ _ \/ /
/ /
/ // / / / / / / // / // ( ) / /
__/__/
/ // // ./__/__/\//
/
/
Composer version 1.9.0 2019-08-02 20:55:32

Usage:
command [options] [arguments]

Options:
-h, --help Display this help message
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi Force ANSI output
--no-ansi Disable ANSI output
-n, --no-interaction Do not ask any interactive question
--profile Display timing and memory usage information
--no-plugins Whether to disable plugins.
-d, --working-dir=WORKING-DIR If specified, use the given directory as working directory.
--no-cache Prevent use of the cache
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
about Shows the short information about Composer.
archive Creates an archive of this composer package.
browse Opens the package's repository URL or homepage in your browser.
check-platform-reqs Check that platform requirements are satisfied.
clear-cache Clears composer's internal package cache.
clearcache Clears composer's internal package cache.
config Sets config options.
create-project Creates new project from a package into given directory.
depends Shows which packages cause the given package to be installed.
diagnose Diagnoses the system to identify common errors.
dump-autoload Dumps the autoloader.
dumpautoload Dumps the autoloader.
exec Executes a vendored binary/script.
global Allows running commands in the global composer dir ($COMPOSER_HOME).
help Displays help for a command
home Opens the package's repository URL or homepage in your browser.
i Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
info Shows information about packages.
init Creates a basic composer.json file in current directory.
install Installs the project dependencies from the composer.lock file if present, or falls back on the composer.json.
licenses Shows information about licenses of dependencies.
list Lists commands
outdated Shows a list of installed packages that have updates available, including their latest version.
prohibits Shows which packages prevent the given package from being installed.
remove Removes a package from the require or require-dev.
require Adds required packages to your composer.json and installs them.
run Runs the scripts defined in composer.json.
run-script Runs the scripts defined in composer.json.
search Searches for packages.
self-update Updates composer.phar to the latest version.
selfupdate Updates composer.phar to the latest version.
show Shows information about packages.
status Shows a list of locally modified packages, for packages installed from source.
suggests Shows package suggestions.
thanks Give thanks (in the form of a GitHub ★ ) to your fellow PHP package maintainers.
u Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file.
update Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file.
upgrade Upgrades your dependencies to the latest version according to composer.json, and updates the composer.lock file.
validate Validates a composer.json and composer.lock.
why Shows which packages cause the given package to be installed.
why-not Shows which packages prevent the given package from being installed.

4.镜像地址
5.composer config -g repo.packagist composer https://packagist.phpcomposer.com

相关内容

热门资讯

玩家最新攻略“牵手跑胡子.可以... 玩家最新攻略“牵手跑胡子.可以开挂吗?”透视曝光猫腻您好,牵手跑胡子这个游戏其实有挂的,确实是有挂的...
【第一财经】“星悦麻将.到底有... 网上科普关于“星悦麻将有没有挂”话题很是火热,小编也是针对星悦麻将作*弊开挂的方法以及开挂对应的知识...
终于了解“花城牌舍.辅助器?”... 有 亲,根据资深记者爆料花城牌舍是可以开挂的,确实有挂(咨询软件无需打开...
玩家最新攻略“湘乐.怎么开挂?... 家人们!今天小编来为大家解答湘乐透视挂怎么安装这个问题咨询软件客服徽9784099的挂在哪里买很多人...
今日重大发现“喜扣跑胡子.究竟... 今日重大发现“喜扣跑胡子.究竟有挂吗?”其实是有挂您好,喜扣跑胡子这个游戏其实有挂的,确实是有挂的,...
玩家攻略科普“花城牌舍.真的有... 您好:花城牌舍这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游戏...
【今日要闻】“琼雀海南麻将.可... 【今日要闻】“琼雀海南麻将.可以开挂吗?”详细开挂教程您好,琼雀海南麻将这个游戏其实有挂的,确实是有...
【第一财经】“游戏茶苑.真的有... 网上科普关于“游戏茶苑有没有挂”话题很是火热,小编也是针对游戏茶苑作*弊开挂的方法以及开挂对应的知识...
【第一消息】“全民如意棋牌.怎... 有 亲,根据资深记者爆料全民如意棋牌是可以开挂的,确实有挂(咨询软件无需...
今日重磅消息“情怀莆仙.怎么装... 网上科普关于“情怀莆仙有没有挂”话题很是火热,小编也是针对情怀莆仙作*弊开挂的方法以及开挂对应的知识...