Saturday, September 26, 2009

Steps in Installing cakePHP in Ubuntu

Installing CakePHP on Linux/Ubuntu is a bit tricky as you have to on the mod-rewrite and set the AllowOverride property from None to All. This is why I am giving you the exact steps to install CakePHP on your Ubuntu/Linux LAMP Server successfully so that your CakePHP index page shows with proper formatting with css.

1. Check the mod-rewrite whether it is enabled or not by running the following command:

sudo a2enmod rewrite

You will get a message like this “This module is already enabled!” if your mod-rewrite is already enabled. If mod-rewrite is not enabled, follow the on-screen instructions to install it.

2. Open and edit the default file from this directory /etc/apache2/sites-available/default by using the following command:

sudo nano /etc/apache2/sites-available/default

if you don’t know how to use nano, than you may use another way to set the write permission by running the following command though it’s not recommended ;)

sudo chmod -R 755 /etc/apache2/sites-available/default

3. Find the following Directory structure:


Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all


4. Find AllowOverride None and replace with the following text

AllowOverride All

5.Restart apache using:

sudo /etc/init.d/apache2 force-reload

And you are done! :)
Now you should now be able to view http://localhost/ with the correct css formatting for the cake default page.

No comments:

Post a Comment