How to automatically install Composer's php-build plugin

藏色散人
Release: 2021-07-01 00:10:07
forward
2420 people have browsed it

How to automatically install the php-build plug-in of Composer? The following is a detailed introduction to the method of automatically installing Composer's php-build plug-in in the composer tutorial column.

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

wget -O install.sh http://git.io/Hqr8pQ || curl -o install.sh http://git.io/Hqr8pQ && ./install.sh
Copy after login

Default installation to /usr/local/, set the PREFIX environment variable to switch Installation location.

Manual installation

First download the plug-in:

wget https://github.com/rogeriopradoj/php-build-plugin-composer/archive/master.tar.gz
tar -vzxf master.tar.gz
Copy after login

In order to facilitate the update, you can also use git clone:

git clone https://github.com/rogeriopradoj/php-build-plugin-composer.git php-build-plugin-composer-master
Copy after login

Ensurecomposer.shhas executable permissions:

cd ~/php-build-plugin-composer-master
chmod +x share/php-build/after-install.d/composer.sh
Copy after login

Finally, copy the share directory to your php-build installation, or set up the software Link:

Copy

cd ~/php-build-plugin-composer-master
cp -r share /usr/local
Copy after login

Link

cd /usr/local/share/php-build/after-install.d
ln -s ~/php-build-plugin-composer-master/share/php-build/after-install.d/composer.sh
Copy after login

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.

The above is the detailed content of How to automatically install Composer's php-build plugin. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:segmentfault.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!