Install composer on mac

Install download the composer using the following curl  command in the terminal:

curl -sS | php

After the command, you will have composer.phar file in the current directory and the composer command is available as:

php composer.phar [composer commnad]

In order to make composer available globally, you have to move the recently downloaded composer.phar to local user’s bin folder as follow:

  • go to /usr/local/bin folder . You can click  Shift + Command + G to open the dialog to go to folder.
  • move the recently downloaded composer.phar in the usr/local/bin folder
  • create a alias using command  alias composer="php /usr/local/bin/composer.phar"

Now, you can access the composer from the terminal simply using the composer  command. Thats it.