Install Composer – PHP dependency manager CWP
Composer can be installed in your server quickly and it’s very easy to install:
First update the server :
yum -y update
Switch into the /usr/local/src directory.
cd /usr/local/src
Install Composer by using cURL
curl -sS https://getcomposer.org/installer | php
To use Composer globally run this below command ensure to use as user and user should have full shell access in order to use it :
mv -f composer.phar /usr/local/bin/composer
to check composer version :
composer -V
to run composer via different php version use full path of php bin and composer path eg :
/usr/local/bin/php /usr/local/bin/composer command
All selectors php bin path can be found in /opt/alt
eg :
/opt/alt/php73/usr/bin/php /usr/local/bin/composer command
source : Install Composer – PHP dependency manager – Control WebPanel Wiki
Posted on: October 21, 2024, by : Julian's | 6 views