Global installation of Composer and liunxcomposer in Liunx
I put it in the PATH directory of the system so that it can be accessed globally.
curl -sS https://getcomposer.org/installer | phpmv composer.phar /usr/local/bin/composer
Note:If the appeal command fails to be executed because of the permission, use sudo to run the mv command again.
Enter the command: composer-VComposer version 1.0-dev (feefd51565bb8ead38e355b9e501685b5254d0d5)
The above words indicate that the installation is successful!
The following is a specific command!
Wangyulu @ wangyulu-Lenovo :~ $Curl-sS https://getcomposer.org/install | phpThe program "curl" has not been installed. Run the following command to install sudo apt-get install curlwangyulu @ wangyulu-Lenovo :~ $Sudo apt-get install curl[Sudo] password for wangyulu: Reading the package list... the dependency tree of the software package being analyzed is reading status information... after the installation is complete, the following additional software packages will be installed: The following [new] software packages libcurl3 will be installed: The following software packages curl will be upgraded: libcurl3 has upgraded one software package and one new software package is installed, to uninstall 0 software packages, 267 software packages are not upgraded. Download the 310 kB software package. After decompression, 339 kB of extra space will be consumed. Do you want to continue? [Y/n] obtain: 1 http://cn.archive.ubuntu.com/ubuntu/ vivid-updates/main libcurl3 amd64 7.38.0-3ubuntu2. 2 [180 kB] Get: 2 http://cn.archive.ubuntu.com/ubuntu/ vivid-updates/main curl amd64 7.38.0-3ubuntu2. 2 [129 kB] Download 310 kB, which takes 0 seconds (700 kB/s) (reading the database... the system currently has 180902 files and directories installed .) Preparing to unpack... /libcurl3_7.38.0-3ubuntu2.2_amd64.deb... libcurl3: amd64 (7.38.0-3ubuntu2. 2) Unpack the package to (7.38.0-3ubuntu2... selecting the unselected Software Package curl. Preparing to unpack... /curl_7.38.0-3ubuntu2.2_amd64.deb... unpacking curl (7.38.0-3ubuntu2. 2 )... processing the trigger for man-db (2.7.0.2-5... setting libcurl3: amd64 (7.38.0-3ubuntu2. 2 )... setting curl (7.38.0-3ubuntu2. 2 )... processing the trigger for libc-bin (2.21-0ubuntu4... wangyulu @ wangyulu-Lenovo :~ $Curl-sS https://getcomposer.org/installer | php#! /Usr/bin/env phpAll settings correct for using ComposerDownloading... Composer extends installed to:/home/wangyulu/composer. pharUse it: php composer. login @ wangyulu-Lenovo :~ $Mv composer. phar/usr/local/bin/composerMv: Unable to move "composer. phar" to "/usr/local/bin/composer": insufficient permissions wangyulu @ wangyulu-Lenovo :~ $Sudo mv composer. phar/usr/local/bin/composerWangyulu @ wangyulu-Lenovo :~ $Composer-VComposer version 1.0-dev (feefd51565bb8ead38e355b9e501685b5254d0d5)
Reference: http://docs.phpcomposer.com/00-intro.html