Forked from kkirsche/Install Composer to use MAMP's PHP.md
Last active
August 29, 2015 14:07
-
-
Save jdeagle/561273b4c99f67870bc7 to your computer and use it in GitHub Desktop.
Revisions
-
d3cept1on revised this gist
Jun 5, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ ##Create an alias to MAMP's PHP installation To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well. -
d3cept1on renamed this gist
Jun 5, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ #Create an alias to MAMP's PHP installation To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well. -
d3cept1on renamed this gist
Jun 5, 2013 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
d3cept1on revised this gist
Jun 4, 2013 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ Create an alias to MAMP's PHP installation To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well. -
d3cept1on created this gist
Jun 4, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,33 @@ ## Create an alias to MAMP's PHP installation To do this, we can simply create an alias for our bash profile. We'll be doing this is nano, though you can do it in vim or a number of other editors as well. Within the terminal, run: nano ~/.bash_profile This will open nano with the contents, at the top in a blank line add the following line: alias phpmamp='/Applications/MAMP/bin/php/php5.4.10/bin/php' This will create an alias, phpmamp, so that you can take advantage of the MAMP installation of PHP. Please take note of the PHP version, in this case 5.4.10, as with different versions of MAMP this may be different. Check your installation and see what version you have, and replace the number accordingly (this was written with MAMP version 2.1.2). With that setup, we are ready to install composer. This is a two step process if we would like this to be installed globally, while you would only need to do the first step if you would like this installed to the local working directory only. First, run the following command in the terminal: curl -sS https://getcomposer.org/installer | phpmamp Note that instead of the standard 'php' at the end, we are using 'phpmamp' so that we correctly use the MAMP installation of PHP. Next, we want to make this available globally, so we need to move the file to '/usr/local/bin/composer'. To do this, run the following command: sudo mv composer.phar /usr/local/bin/composer Terminal will ask you for yor password, after entering it and pressing the 'return' (or enter) key, you'll have a working global installation of composer on your mac that uses MAMP! You can verify your installation worked by typing the following command: composer It'll show you the current version and a list of commands you can use!