简体   繁体   中英

How to Install Composer globally on Cloudlinux

I can't seem to install Composer globally on Cloudlinux. I have managed to install packages like git etc but these are actual packages unlike composer.

I made Git globally available using the cagefsctl eg:

$ cagefsctl --addrpm git
$ cagefsctl --update 

But this doesn't seem to work for Composer (which makes sense).

How do I do this for non packages like Composer?

In order to install composer, you must first download and install the package :

curl -sS https://getcomposer.org/installer | php

Once the package is install move the file :

mv composer.phar /usr/local/bin/composer

If you are using CageFS, you'll need to take a extra step and create a configuration file for Composer using vim :

vi  /etc/cagefs/conf.d/composer.cfg

In the file, you'll need to declare the composer executable :

[composer]
paths = /usr/local/bin/composer

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM