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 e.g.:
$ 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?
Advertisement
Answer
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