Install Composer on CentOS


Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you.


First you have to go to the /tmp directory

cd /tmp


Download the composer.phar file

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


Move it to /usr/local/bin/

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


Now you can to use the command composer globally.

Comments

Jun 16
Trey Jones
Waaoh Thanks... that was awesome.

Jan 17
Kevin
Thanks for this. I found simple and useful

Mar 17
Roberto
I'm trying to install composer on my server centos 6.5 PHP Version 5.6.30

I tried it with this command

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

but I get this error:

PHP Fatal error: Directive 'safe_mode' is no longer available in PHP in Unknown on line 0
curl: (23) Failed writing body (0 != 16133)

how do I fix? thanks

Apr 17
Reza
Thanks.

Apr 17
epictrim
Turn Off the safe_mode on your php.ini, then restart Apache.




 



Copyright © 2017 epictrim. All rights reserved.What we doOur WorkInsideIdeasJoin UsContact Us