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

Detailed explanation of the cache implementation principle of Vue computed

Table of contents Initialize computed Dependency ...

Why MySQL database avoids NULL as much as possible

Many tables in MySQL contain columns that can be ...

Introduction to RHCE bridging, password-free login and port number modification

Table of contents 1. Configure bridging and captu...

How to delete node_modules and reinstall

Table of contents Step 1: Install node_modules in...

Nested display implementation of vue router-view

Table of contents 1. Routing Configuration 2. Vue...

Two ways to specify the character set of the html page

1. Two ways to specify the character set of the h...

HTML table tag tutorial (24): horizontal alignment attribute of the row ALIGN

In the horizontal direction, you can set the row ...

Ubuntu 15.04 opens mysql remote port 3306

Ubuntu 15.04 opens MySQL remote port 3306. All th...

Analysis of MySQL user management operation examples

This article describes the MySQL user management ...

Detailed explanation of tinyMCE usage and experience

Detailed explanation of tinyMCE usage initializat...

How to use linux commands to convert and splice audio formats

Install FFmpeg flac eric@ray:~$ sudo apt install ...

Basic knowledge: What does http mean before a website address?

What is HTTP? When we want to browse a website, w...

Detailed explanation of hosts file configuration on Linux server

Linux server hosts file configuration The hosts f...

Tutorial on how to quickly deploy a Nebula Graph cluster using Docker swarm

1. Introduction This article describes how to use...