All Linux HowTo's

Install Composer on CentOS/Redhat

This article explains how to install Composer on a CentOS and Redhat system.

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

You should get something like this in return. Note that i have an old version of PHP on this system so it warns me about it:

[root@server ~]# cd ~
[root@server ~]# curl -sS https://getcomposer.org/installer | php
#!/usr/bin/env php
Some settings on your machine may cause stability issues with Composer.
If you encounter issues, try to change the following:

Your PHP (5.3.3) is quite old, upgrading to PHP 5.3.4 or higher is recommended.
Composer works with 5.3.2+ for most people, but there might be edge case issues.

Downloading...

Composer successfully installed to: /root/composer.phar
Use it: php composer.phar

Finally move it to where you want it:

[root@server ~]# mv composer.phar /usr/local/bin/composer

At this stage you should be fine.

Similar Posts: