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

How to solve the problem of clicking tomcat9.exe crashing

A reader contacted me and asked why there were pr...

How to use Docker Compose to implement nginx load balancing

Implement Nginx load balancing based on Docker ne...

Several important MySQL variables

There are many MySQL variables, some of which are...

Use the more, less, and cat commands in Linux to view file contents

In Linux, the commands cat, more, and less can al...

MySQL log system detailed information sharing

Anyone who has worked on a large system knows tha...

ElementUI component el-dropdown (pitfall)

Select and change: click to display the current v...

Summary of various implementation methods of mysql database backup

This article describes various ways to implement ...

MySQL helps you understand index pushdown in seconds

Table of contents 1. The principle of index push-...

Teach you how to insert 1 million records into MySQL in 6 seconds

1. Idea It only took 6 seconds to insert 1,000,00...

How to install and configure the Docker Compose orchestration tool in Docker.v19

1. Introduction to Compose Compose is a tool for ...

MySQL Series II Multi-Instance Configuration

Tutorial Series MySQL series: Basic concepts of M...

MySQL database constraints and data table design principles

Table of contents 1. Database constraints 1.1 Int...

Some basic instructions of docker

Table of contents Some basic instructions 1. Chec...