Created
October 31, 2011 05:31
-
-
Save carlynorama/1326964 to your computer and use it in GitHub Desktop.
install drush into MAMP setup
This file contains 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 characters
#go to the folder | |
cd /Applications/MAMP/bin | |
#get drush off on the internet (mac has curl not wget, make sure it is the latest drush) | |
curl -O http://ftp.drupal.org/files/projects/drush-7.x-4.5.tar.gz | |
#decompress | |
tar -zxvf drush-7.x-4.5.tar.gz | |
#delete tar ball | |
rm drush-7.x-4.5.tar.gz | |
#user executable | |
chmod u+x drush/drush | |
#look at your path | |
echo $PATH | |
#confirm bash or zsh | |
echo $PATH | |
#if bash, look at what is in .bashrc (might be .profile, .bash_aliases, .bashrc (non interactive), .bash_profile) | |
cat ~/.profile | |
# open the file with nano | |
nano ~/.profile | |
#Add the following line to the bottom of the file and save: (no quotes or comment hash) | |
#"export PATH=${PATH}:/Applications/MAMP/bin/drush" | |
#reload the saved file | |
source ~/.profile | |
#look at the path | |
echo $PATH | |
#check to see if it really works | |
which drush | |
#hard won knowledge below - only use if your drush install doesn't connect to the database: | |
#i.e. you get the error - | |
#Can't connect to local MySQL server through socket '/tmp/mysql.sock' (2) [0.11 sec, 4.3 MB] | |
#this is a problem that happens when the mysql server and php are both on localhost | |
sudo mkdir /var/mysql | |
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment