Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Centos7 install composer

2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

1. Download composer.phar

/ / if you fail because of the network, try a few more times

Curl-sS https://getcomposer.org/installer | php

two。 Move composer.phar to the environment to make it executable

Mv composer.phar / usr/local/bin/composer

3. test

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. Mirror address 5.composer config-g repo.packagist composer https://packagist.phpcomposer.com

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report