php-build can help you compile and manage different versions of PHP installations. Travis CI, a well-known continuous integration testing service, uses php-build.
Composer is a new generation of PHP package manager.
Composer Plugin combines the two. It is a plug-in for php-build that automatically installs Composer on each php-build build, so you don't have to install it manually.
Installation
Use the installation script
1 |
|
Default installation to /usr/local/
, set the PREFIX
environment variable to switch Installation location.
Manual installation
First download the plug-in:
1 2 |
|
In order to facilitate the update, you can also use git clone
:
1 |
|
Ensurecomposer.sh
has executable permissions:
1 2 |
|
Finally, copy the share
directory to your php-build
installation, or set up the software Link:
Copy
1 2 |
|
Link
1 2 |
|
Note, here we assume that you installed php-build
to /usr/local
(default location), if your php-build
installation location is different, you need to adjust the above command.
There is nothing to say about using
. Just use php-build
as usual, composer
will be installed automatically, no need to worry.