Cakephp installation and blog tutorial step by step

CakePHP is one of the best PHP MVC framework which is purely inspired by Ruby on Rails. I worked on ROR for many years. So I know CakePHP has very similar ROR standards. Here In this article I will show you about CakePHP installation on linux box in very detailed information. I created the very basic blog application using CakePHP and It is free for download.

Cakephp installation and blog tutorial step by step

I am using the linux box for installation following commands will be useful for any linux installation. You can use the any linux OS like (Ubuntu, Fedora, Redhat, centos, etc… )

#pear channel-discover pear.cakephp.org
#pear remote-list -c cakephp
#pear install cakephp/CakePHP

Go to folder where you want to create the project
#cd /var/www/html/

Create the project using following command
#cake bake project cakeblog


{
"name": "cakeblog",
"repositories": [
{
"type": "pear",
"url": "http://pear.cakephp.org"
}
],
"require": {
"pear-cakephp/cakephp": ">=2.4.0"
},
"config": {
"vendor-dir": "Vendor/"
}
}

#cd cakeblog
#chown purab:purab -R cakeblog
#chown apache:apache -R cakeblog/tmp

Download debug_kit
https://github.com/cakephp/debug_kit
Add into the Plugin Dir

Download commposer
http://getcomposer.org/download/

using following command and console:
#curl -sS https://getcomposer.org/installer | php

Create the composer.json file in cakeblog folder and add following lines in that file

After that execute the following command

#php composer.phar install

Open the webroot/index.php file and add the following lines at line no 82.


define(
'CAKE_CORE_INCLUDE_PATH',
ROOT . DS . APP_DIR . '/Vendor/pear-pear.cakephp.org/CakePHP'
);

You can download my Blog code from Following Link.

[sociallocker]https://github.com/purab/cakeblog[/sociallocker]

Reference Used:
http://book.cakephp.org/2.0/en/getting-started.html#blog-tutorial

http://book.cakephp.org/2.0/en/installation/advanced-installation.html

 

Published by

Purab

I am Purab from India, Software development is my profession and teaching is my passion. Programmers blog dedicated to the JAVA, Python, PHP, DevOps and Opensource Frameworks. Purab's Github Repo Youtube Chanel Video Tutorials Connect to on LinkedIn

Leave a Reply

Your email address will not be published.