On 8-Jun-06, at 12:44 PM, [EMAIL PROTECTED] wrote:
> > So I think I finally got Cake working on a Mac. Here's what I did: > - reinstall OS X 10.4 & get all updates > - install MySQL 5 from www.mysql.com > - install php5 from www.entropy.ch > - install TinkerTool from http://www.bresink.de/osx/ > TinkerTool.html to > show hidden files (you'll need this to view hidden files otherwise > you'll lose your .htaccess file which is very bad!) > - download latest CakePHP & extract > - delete everything in /Library/WebServer/Documents > - copy all Cake files & folders (app/, cake/, vendors/, index.php, > VERSION.txt, and .htaccess) to /Library/WebServer/Documents > - edit httpd.conf so it says "AllowOverride ALL" in the > DocumentRoot's > <Directory> section > - recursively allow read & write access to app/tmp folder & all its > subfolders (do this by doing Get Info on tmp folder) > - http://localhost should now load the Cake welcome page with all its > images & layout > - the 15 minute blog tutorial (http://manual.cakephp.org/chapter/18) > then worked just fine > > Hopefully this post can be a reference for others in the future - if > someone wants to steal this text for docs or a wiki, be my guest! You really want to get familiar with Terminal (/Applications/ Utilities/Terminal.app). It will greatly simplify things compared to having to move files around in the Finder. (Plus, you don't have to deal with messing up your finder windows -- I prefer my home directory to at least look clean.) Four lines of typing is much simpler than bouncing around a bunch of Finder windows. And when you start factoring in other tools such as version control or managing multiple projects on your machine, the GUI complexity skyrockets while the CLI remains fairly constant. To do everything from 'download Cake' onwards is just this: rm -r /Library/WebServer/Documents/* svn export 'https://svn.cakephp.org/repo/trunk/cake/1.x.x.x' Library/ WebServer/Documents chmod -R a+rw Library/WebServer/Documents/app/tmp EDITOR /etc/httpd/httpd.conf where EDITOR is mate/bbedit/edit/see/vi/emacs/pico depending on whether you prefer TextMate, BBEdit, TextWrangler, SubEthaEdit, vi, emacs, or pico. For myself, I use a custom-built PHP, Fast-CGI and Lighttpd to run my apps locally, and Capistrano to push them out to the server. Each app gets it's own port number on my machine and it's own domain (or subdomain) on the actual server. And I've got a Rakefile for each project that gives me a quick set of useful shortcuts. Add in a skeleton application in version control and starting a new project is just a matter of: svk sync //mirror/cake svk smerge //mirror/cake //local/numa/skeleton/trunk -m "syncing cake" svk cp //local/numa/skeleton //local/numa/current/project-name -m "creating project-name project" svk co //local/numa/current/project-name cd project-name mate config/lighttpd.conf config/deploy.rb [alter a few settings in the config files] rake server:start mate trunk mysqladmin -uroot -p create project-name echo "GRANT ALL ON project-name.*TO 'project-name'@'localhost' IDENTIFIED BY 'password';" | mysql -uroot -p project-name I should probably get around to wrapping all that in a shell script, but I don't type it enough for it to actually bug me. :) Basically, that just: updates my local copy of the CakePHP trunk copies any changes in trunk to my skeleton project makes a copy of the skeleton project in source control checks out the new project opens the Lighttpd and Capistrano config files for editing creates a new TextMate Project for the project's trunk creates the database creates the db user I generally copy the database.php.default file in the Finder and edit in the new DB settings by hand. Again, I should probably automate that, but old habits die hard. :) I'm trying to convince you that the command line is a really useful tool (on *nix machines at least) and will save you time. Plus, if you ever have anyone looking at your screen, typing three words and having a nice long capistrano or svk progress transcript flow past can be rather impressive. :) s. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php -~----------~----~----~----~------~----~------~--~---