For more Apple goodness, check out Rob’s Noise to Signal cartoons about life as a Mac user!
Update: There’s a much more thorough (and up-to-date!) tutorial now on Drupal.org, which carries that Drupal imprimatur and also kinda lets me off the hook. Just head over to this tutorial.
–
This is the part you should now ignore: Want to take the latest, greatest edition of Drupal out for a spin – and run it from the comfort and safety of your very own Mac? Only a few short years ago, that was strictly the domain of the geekier Mac users… but today, it’s a lot easier.
That’s thanks to programs like MAMP, which stands for Macintosh, Apache, MySQL and PHP. MAMP lets you install and launch these powerful tools without ever having to stare a command line in the face. And once you have them up and running (which you will in just a few clicks), you can install all sorts of server-side software on your Mac and access it through your web browser – programs like WordPress, activeCollab and, yes, Drupal.
Why do that? Partly so you can futz around with them even if you aren’t connected to the web, and with the kind of access no web host in their right minds would give you. Partly so you can configure, test and debug web sites on your computer without worrying that the world is watching. But mainly because, come on, this is kind of cool.
So let’s not waste any more time gabbing. We’re going to install Drupal (by the way, you can adapt these instructions for a lot of other server software): not boring old version 4.7, but the exciting new testing version with the very latest features. One of those features is an automatic installer, which is how we’re able to hold this down to five easy steps.
(If you do want to install version 4.7, then instead of step 5, you’d manually edit the settings.php file in Drupal’s sites/install folder, and then run a few MySQL files through PHPMyAdmin. It’s all explained in painful detail in the install.txt file that comes with Drupal.)
- Get ready:
- Download and install MAMP. (Go to http://www.mamp.info/en/home/ to find it.)
- Then download the latest version of Drupal. (Go to http://drupal.org/project/Drupal+project and pull down “CVS” from the “Filter by version” menu. This will give you the version that includes an installer.)
- Unzip it, and move the files into MAMP’s “htdocs” folder.
- Launch MAMP and your favourite browser. If the buttons next to “Apache Server” and “MySQL Server” in MAMP aren’t green, click the “Start Servers” button. If that doesn’t turn the servers on, you’ll need to troubleshoot MAMP before you go any further.
- Create an empty MySQL database for Drupal to use.
- Point your browser to http://localhost:8888/phpMyAdmin/ and click on the “Databases” tab.
- Under “Create a new database”, fill in the information for your database. Give it a name (say, “droopy”) and, in the pulldown menu that says “Collation”, choose “utf8_unicode_ci”. Click “Create.”
- Create a database user account for Drupal.
- In the left-hand sidebar, click on the home icon. (It looks like a little house.)
- In the main pane, you’ll see two columns. In the left-hand column, click “Privileges”.
- Under the table listing all sorts of users, click “Add a new User”.
- Give the user a name (no spaces – make it a simple name). For “Host”, choose “Use text field” and enter “localhost”. Key in a password, and re-type it.
- Under “Global privileges”, make sure none of the items are checked. Click the “Go” button in the lower right-hand corner.
- The next screen allows you to edit the user. Scroll down to “Database-specific privileges” and, using the pull-down menu, select your Drupal database – in our case, droopy.
- A series of checkboxes appear, just like the “Global privileges” screen a little while ago. This time, click “Check All” and click the “Go” button at the bottom right of the “Database-specific privileges” section.
- Tell Drupal what database settings to use.
- Point your browser to http://localhost:8888.
- Fill in the information that Drupal asks for: MySQL as the database type, the name of the database (“droopy”, in this case), your user name and your password. Click the “Save” button.
If all went well, you’ll be looking at a screen that congratulates you on installing Drupal, and invites you to click on a link to visit your site. Add content, install modules, start theming – you can do it all. There are a few other things you might like to do (for instance, setting up a regular call to cron.php in crontab, and there you will have to open up Terminal); have a look at Drupal’s install.txt file for a explanation.
(Special thanks to Evan Leeson and Aaron McNeal for their advice on the MySQL/phpMyAdmin instructions. Very kind and generous, guys!)
Wow, MAMP is the greatest thing since, um… penny stamps? The Cramps? Mrs. Vandertamp?
Anyway, thanks for the advice, Rob! I’ve only had it running 15 minutes and already I’ve got WordPress & Drupal running. Can’t wait to install & play around with mediawiki! Yay!!
I have a problem with the last step 5. I did all of the above steps but still I don’t get to the page where Drupal asks for the name of the database, username and password. All I see is:
Apache/2.0.55 (Unix) PHP/5.1.4 DAV/2 mod_ssl/2.0.55 OpenSSL/0.9.7i Server at localhost Port 8888
Ashish, click on the drupal_csv file and you will go to the correct screen. hope this helps.
Oops, the file name you click on is drupal-cvs/ :)
Hi kristi,
where can i find drupal_csv file. it is so frustrating. I was busy with other things and now trying to use drupal but can’t. I am stuck in the same place.
sorry…where can i find drupal-cvs ?
hey kristi,
you are my life saver. thank u so much. i downloaded drupal-cvs from drupal.org. I think it is working now.
Hurrah!! for kristi
I’m having the same problem that Ashish had. Everything looks good, up to Step 5. When I point my browswer to http://localhost:8888, I get a screen that says “Index of:/” then a folder of my drupal folder, “drupal/” and then that bit about Apache, etc (Apache/2.0.59 (Unix) PHP/5.1.6 DAV/2 mod_ssl/2.0.59 OpenSSL/0.9.7i Server at localhost Port 8888)
I looked up the Drupal CVS, but I can’t find an actual file “drupal-cvs/”.
I’m a total newbie to Drupal/CMS development, and I have no back-end programming knowledge. Any help would be greatly appreciated. Thanks!
Many many thanks for these remarkably clear directions. I installed Drupal in about 5 minutes!
Thank you for the clear, simple, concise instructions. Worked like a charm.
I really appreciate you taking the time to post this tutorial.. it was simple yet EXTREMELY helpful. I’ve been working at this for 2-3 hours and then I came upon this.. thanks
Great tutorial. You make it very simple. I’m totally new to CMS, and had been struggling with this for 2 days. I couldn’t really grasp it and was overlooking some steps. Thanks very much!
Rob:
Thank you, thank you, thank you. I tried three other tutorials, including one at drupal.org, before finding yours, which was the only one that resulted in an actual installation. I should have known to shop locally.
It’s great to hear this worked for so many folks! (This stuff always seems to involve a little waving of dead chickens over your keyboard with your fingers crossed, and I wish I was able to offer more helpful advice to some of the other commenters here.)
And Mark, was this just tinkering on your part, or is there some exciting project on its way from the fertile mind behind BC’s best media blog?
At the moment, I’m tinkering-with-intent to move the college newspaper from Joomla to Drupal. After that, who knows?
Thanks for the compliment.
Mark
Many thanks for this tutorial.
It works great on my old iMac, the computer where i installed MAMP and activecollab (not drupal).
but when i try to access the site from another computer in my house, all links turns to localhost…
I type http://10.0.1.220:8888/index.php?c=access&a=login to access the activecollab login page but after i log in, all links goes to localhost…
do you know in which setup i must replace localhost by the private IP of my machine ?
Thank you again
Marc
Hi Rob,
I am a newbie to all this, and so much appreciated finding your easy to follow tutorial (been looking at CMSs for a little while as a means to setting up a website community that I have been thinking about, dithering between Joomla! and Druple – but that is a whole other story! …..)
Anyway, got 5.1 installed on my iBook G4 with MAMP and then when logged in as 1st user, went to Administer and had red box warning:
“One or more problems were detected with your Drupal installation. Check the status report for more information”.
Clicked through to Status Report and got the following 2 ‘red crosses’:
“Cron maintenance tasks Never run
Cron has not run. It appears cron jobs have not been setup on your system. Please check the help pages for configuring cron jobs. You can run cron manually.”
and
“File system Not writable
The directory files does not exist. You may need to set the correct directory at the file system settings page or change the current directory’s permissions so that it is writable.”
(I installed MAMP a coupe weeks back at the same time as a Moodle install, and have since installed Joomla (1 and 1.5)).
As part of the learning curve I will be searching around for the implications of this, but thought I would post here in case it is anything anyone else has come across??
Thanks,
Adrian
Great tutorial! really help. Thanks so much.
The next step is; I am waiting your next tutorial to make my site really life (not finish yet untill now), so.. how to transfer my local drupal site to hosting company, never have experience bout it. i have plan to use 1&1.de
I’m also struggling with step 5 though the message I get is slightly different: “Forbidden. You don’t have permission to access / on this server. Apache/2.0.59 (Unix) PHP/5.1.6 DAV/2 Server at localhost Port 8888”.
What am I doing wrong? Heeeeeeeeelp
Ole
Like Marc in comment #17 I couldn’t connect to my old iMac on which I’d installed MAMP and Drupal. It was blocked by the firewall. I went into system preferences and opened port 8888 and can now connect from other computers on my LAN.
THANK YOOOOOOOOOOOOOUUUUUUUUUUU!!!!!!!!!!!!!!!!
It may be worthwhile noting that the .htaccess file is hidden by default in OSX and is most likely not going to be copied to your html directory, thus rendering clean url’s unusable until the file resides in the root of the Drupal dir.
Use this command in the finder window to show all hidden files and the relaunch Finder to show the files, just change the True on the end to False to hide them again after you have copied the .htaccess file.
Show/Hide hidden files (do this from a terminal window):
defaults write com.apple.finder AppleShowAllFiles -bool true
Nice catch, Brant. And thanks for the feedback, everyone!
I have done the install like you say however once I install Drupal entirely, and start adding some Core Optional modules it seems to stop working.
I have looked over everything I might know how to do, but at the point of clicking “Save Configuration” it goes to a blank screen.
Can you help me?
Other then that…THIS IS AN AMAZINGLY FAST WAY TO EDIT MY DRUPAL SITE! I just need it to work fully.
Great tutorial, thanks a ton! One thing to note is this works for Drupal 5.x but not 6.x or 7.x (from what I found).
Thanks, again!
Great help, thanks. If you want to install Drupal 6.2 in windows then check here: http://pro-developer.blogspot.com/2008/04/how-to-install-drupal-62.html
Hi! Your tutorial is very helpful but I am trying to instal 6.2 on my mac and I’m not sure how to. Any tips? All the same steps worked for me (with minor changes), but when I got to step five I clicked on the link and it just said that the virtual host was set up successfully and that I could modify for delete that page. But nothing about Drupal. So what should I do next.
Thanks!
nice detailed article.. thanks
drupal rocks.
hi,
problem on installing drupal it says:
error
Copy the ./sites/default/default.settings.php file to ./sites/default/settings.php.
Change file permissions so that it is writable by the web server. If you are unsure how to grant file permissions, please consult the
i need some help
it got installed but now its not taking username and passward, whenever i try to create new it says sent to email but nothing comes
thanks rob. totally saved me when my IT guy said it was too complicated for someone with no tech exp.
kudos to you
see also for a useful tip if you’re stuck creating the database: http://drupal.org/node/332730
I think i finished it all because I see the welcome to your page screen, but every time i click on something it tells me “Access denied
You are not authorized to access this page. ” What do i do ?
I tried all the wonderful suggestions on installing a local copy of Drupal on 10.4
http://drupal.org/node/202483
http://drupal.org/node/281655
this is the worst !!!!!
Rob, very nice article but I got stuck on the last step. I enter in my database name, username, and password and the page refreshes but nothing happens. I don’t get a warning or anything. Any suggestions?
Nevermind, I must have changed a drupal file. I redowlnoaded drupal and it works great. Thanks a lot of your help.
Glad it worked out!
THANK YOU! I don’t know I screwed up such a simple process the first time, but your guide righted the ship.
thanks man ! it helpt a lot !
Hi Rob, very nice article but I got stuck on the last step. I enter in my database name, username, and password and the page refreshes but nothing happens. I don’t get a warning or anything. Any suggestions?
I used the same question from Joe’s post above. I tried re-downloading drupal and re-installing but still have the same issue of not getting past the name and password page it just reloads so I don’t even know if the installer goes past that point or not. I’ve deleted and re-made databases and users but nothing seems to work. After the password page what is supposed to happen.
I’m stuck
Don
Don,
I am new doing this but have lots of background. Rob’s instructions are infinitely better than others I have found.
I don’t know your level but have you deleted you stuff before reinstalling? May be a silly question but it sounds like even though you are redoing everything it is still looking at the originally installed version.
Good luck,
Mr. Voltage
Ack!
Sorry just noticed you post was quite old. It is late for me.
Good night,
S. Voltage
No problem, Spike… and thanks for the kind words!
Hey,
on step #3, theres a link that you say to click, but when i clicked it, it says “not found”.
Could You help me , i’m very new at this.
thanks,
mica
Awesome! I have tried using other instructions over the past week with no success. I just loaded Drupal 7 on my Mac in 5 minutes. Thanks
This was my lifesaver .. Rob Thanks a Zillion !
I just had to fix my MAMP installation, as Apache was not starting. It was giving IPV4 not found error. I just had to add my host name to 127.0.0.1 localhost , as simple as that.
Awesome article, easy to follow and worked like a charm! I had my local dev environment up in less than 10 minutes.
This is wonderful! Very very helpful to get me started superfast!
i entered http://localhost:8888/, then message link came in screen as
Index of /drupal-7.24/
i clicked on ‘drupal-7.24’ link
page displayed
Page not found
The requested page “/drupal-7.24/” could not be found.
what do i do next?
Good tutorial, very helpful. Thanks!