Monday, May 18, 2015

[Centos, Composer] Install Composer on Centos 6.6

Hello, today I would like to install composer on my Centos machine. Please go thru the steps to see how I manage to install it:




[root@blackhat bin]# curl -SS https://getcomposer.org/installer | php -- --install-dir=/bin --filename=composer
bash: php: command not found
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  5  269k    5 16133    0     0   4489      0  0:01:01  0:00:03  0:00:58 22191
curl: (23) Failed writing body (0 != 16133)

Oppsss!! I forgot to make the php globally. This was happened because I install the php using source package. in order to solve this, I create the symlink for the php.

[root@blackhat bin]# ln -s /my_phpfolder/bin/php /bin/php
 
Now run the above command again:

[root@blackhat bin]# curl -SS https://getcomposer.org/installer | php -- --install-dir=/bin --filename=composer
Downloading...

Composer successfully installed to: /bin/composer
That's it. Hope it'll help

No comments:

Post a Comment