Skip to content

Instantly share code, notes, and snippets.

@kenng
Forked from vinaydotblog/composer-install.sh
Created September 5, 2017 03:54
Show Gist options
  • Save kenng/e694a5fa1c4753644518d099665869a9 to your computer and use it in GitHub Desktop.
Save kenng/e694a5fa1c4753644518d099665869a9 to your computer and use it in GitHub Desktop.
Installing composer using curl
# Goto a directory you can write to:
cd ~
#get composer:
curl -s https://getcomposer.org/installer | php
# move composer into a bin directory you control:
sudo mv composer.phar /usr/local/bin/composer
# double check composer works
composer about
# (optional) Update composer:
sudo composer self-update
@dhohaAbdulkreem
Copy link

hi

@dhohaAbdulkreem
Copy link

thank ypu

@Ethan-Lit
Copy link

Hi, just tried this on Terminal, but instead of installing Composer, I only got an entire PHP file's worth of content echoed in the terminal and nothing else. Can someone look into this?

@kenng
Copy link
Author

kenng commented Mar 9, 2025

Hi, just tried this on Terminal, but instead of installing Composer, I only got an entire PHP file's worth of content echoed in the terminal and nothing else. Can someone look into this?

you need to make composer (which is a PHP script) executable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment