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 | php

Move it to /usr/local/bin/

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

Now you can to use the command composer globally.


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

Jan 17
Thanks for this. I found simple and useful

Mar 17
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 | 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

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

May 17
Marcos Lavorato
Many thanks! =)

Nov 17
Al Mamun
nice! thank you...

Apr 18
Andrew Schultz
Thanks mate, so simple and worked fine.

May 18
Tnks! it works for me!.

Jun 18
Thank Youuuu so much ♥ ♥
Much love

Aug 18
Hong Chen
Works like a charm!

Jan 19
that\'s good
you can also go with it\'s also osm blog

May 19
Tamás Schneemann
You made my day! Thanks a lot!

Jan 20
Endi Hariadi
This is very amazing ... I practiced and succeeded ... Thank you friend ..


Copyright © 2021 Epictrim. All rights reserved.What we doOur WorkInsideIdeasJoin UsContact Us