How to install Composer in Linux

How to install Composer in Linux

1. Download the installation script - composer-setup.php - to the current directory

php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"

2. Perform the installation process

php composer-setup.php

3. Delete the installation script

php -r "unlink('composer-setup.php');"

4. Global installation

sudo mv composer.phar /usr/local/bin/composer (ubuuntu:/usr/bin/composer)

Note: Before installation, make sure PHP is installed correctly (check: php -v to view the version number), and keep the composer version updated with the command: composer selfupdate

Replenish

How to install composer globally in Linux

/Download Composer

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

//Move the composer.phar file to the bin directory so that the composer command can be used globally

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

//Switch domestic source

composer config -g repo.packagist composer https://packagist.phpcomposer.com

This is the end of this article about the steps to install Composer in Linux. For more information about how to install Composer in Linux, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future!

<<:  Teach you MySQL query optimization analysis tutorial step by step

>>:  WeChat applet records user movement trajectory

Recommend

Markup Languages ​​- Lists Again

Click here to return to the 123WORDPRESS.COM HTML ...

Summary of 4 methods of div+css layout to achieve 2-end alignment of css

The div+css layout to achieve 2-end alignment is ...

Mac+IDEA+Tomcat configuration steps

Table of contents 1. Download 2. Installation and...

MySQL 8.0.17 installation and configuration graphic tutorial

This article records the graphic tutorial of MySQ...

How to delete the container created in Docker

How to delete the container created in Docker 1. ...

Detailed explanation of the general steps for SQL statement optimization

Preface This article mainly shares with you the g...

How to use @media in mobile adaptive styles

General mobile phone style: @media all and (orien...

Detailed tutorial on Docker pulling Oracle 11g image configuration

Without further ado Start recording docker pullin...

js to achieve waterfall flow layout (infinite loading)

This article example shares the specific code of ...

How to disable the automatic password saving prompt function of Chrome browser

Note: In web development, after adding autocomplet...

MySQL slow query method and example

1. Introduction By enabling the slow query log, M...

MySQL single table query example detailed explanation

1. Prepare data The following operations will be ...