Quick install CakePHP 2.3.0 on Ubuntu 12.10

CakePHP is a most popular PHP framework. I have written a very simple step-by-step user guide how you can install it on Ubuntu 12.10.

1. Download and install CakePHP to your home folder:

 sudo git clone https://github.com/cakephp/cakephp.git  

2. Create symlink:

 sudo ln -s /home/yourhomedirectory/cakephp/ /var/www/cakephp  

3. Modify CakePHP cache dir permissions:

 sudo chgrp -R www-data /var/www/cakephp/app/tmp/  
 sudo chmod -R g+w /var/www/cakephp/app/tmp  

4. If in your Apache2 configuration file not allowed url rewriting  (the url rewrite module is not enabled) you should enable it, first you should list enabled Apache2 modules:

 cd /etc/apache2/mods-enabled  

If “rewrite.load” doesn’t exists you have to create it:

 sudo vim /etc/apache2/mods-enabled/rewrite.load  

Put into this line:

 LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so  

save this file as name “rewrite.load”

5. Edit your apache2 sites-enabled file:

 sudo vim /etc/apache2/sites-enabled/000-default  

add into these lines

   <Directory /var/www/cakephp/>  
       Options FollowSymLinks  
       AllowOverride All  
     #  Order deny,allow  
     #  Deny from all  
   </Directory>  

6. Restart apache2:

 sudo /etc/init.d/apache2 restart  

7. Check your site on browser

 http://localhost/cakephp/  

Set your database connection and DebugKit.

Advertisements
This entry was posted in Uncategorized and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s