When I recently tried getting started with Akelos, I realised that the required setup for Mac OS X Snow Leopard (10.6) is neither described nor does it match the available tutorials or “Getting Started”s. When I finally got to the point that I had Akelos running on my Mac with MAMP, I decided to do a quick Setup Guide to make it easier for others having the same issues.
I'd recommend to have the following setup for your MAMP Web-Root:
/Applications
/MAMP
/htdocs
/public_html
/link_to_public_folders
/akelos_framework_folder
/any_akelos_project_folder
This means, you do the follwing steps:
You need to make a connection (called “symlink”) between the MySQL-Socket of MAMP and the one delivered by Mac OS X.
sudo mkdir /var/mysql sudo chown _mysql /var/mysql sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
Please check the connection to MAMP's MySQL Server with the following Terminal commands:
/Applications/MAMP/Library/bin/mysql -uroot -proot -P 8889
If everything is fine, it should say “Welcome to the MySQL monitor.” in your Terminal window.
Now launch MAMP.app and start both, the Web- and Database-Server.
You need a local copy of the Akelos Framework now. Get it either via Subversion Checkout or simply download the latest stable release.
Put the “akelos” folder to following directory:
/Applications/MAMP/htdocs/
Unfortunately it looks like you need to setup a new project more or less only via Terminal - the Akelos Web Configuration Wizard seems to be broken due to some unknown reason. But don't mind, I'll describe step by step how this works. In my example, I will stick to the Booklink Tutorial.
cd /Applications/MAMP/htdocs/akelos ./script/setup -d /Applications/MAMP/htdocs/booklink -p /Applications/MAMP/htdocs/public_html/booklink
A new project folder named “booklink” has now be created under /MAMP/htdocs/ (this is the main project folder) and a link to it's public folder (for visitors of your project website) has been put into /MAMP/htdocs/public_html/.
Now you can configure your project and let Akelos create the databases (you can confirm the default values with [RETURN]):
cd /Applications/MAMP/htdocs/booklink ./script/configure -i Database name: [RETURN] Database type: [RETURN] Database user: root Database password: root Development database name: [RETURN] Production database name: [RETURN] Testing database name: [RETURN] Application Locales: [RETURN]
→ In case you get an error “Could not connect to the database” in the Terminal, you should use a MySQL-GUI-Application (such as YourSQL orSequel Pro) to create the databases manually and proceed the configuration by pointing your Webbrowser to http://localhost:8888/booklink/.
Alternatively, open app > config > database.yml and set the host from localhost to 127.0.0.1
The databases have now been setup, the configuration was successful if you see the message “Your application has been configured correctly”.
Your project website should be available on http://localhost:8888/booklink/ (Akelos “Welcome aboard” screen).
Your Project is properly setup and ready that you can get your hands on it. Follow the next instructions from the Booklink Tutorial starting at chapter “The booklink database structure”.