Wednesday, December 3, 2014

Howto install CakePHP 2.5 on Centos 6

Installation of this PHP programming framework is based on the installation guide CakePHP from cakephp.org. There is a document on upgrades from CakePHP 1.3, here.

The Centos Linux 6.4 setup based on requirements:
httpd 2.2.15-28x
php-5.3.3-27x
php-pdo-5.3.3-27x
mysql-5.169x

Step 1: Extract Cakephp 

Download the code from https://github.com/cakephp/cakephp/tags
or from Linux console with proper permission (e.g. use sudo if you are not root user)

wget https://github.com/cakephp/cakephp/archive/2.5.6.zip
cd /var/www/html
unzip cakephp-2.5.6.zip
chown -R apache cakephp-2.5.6
ls cakephp-2.5.6

This gives us the folders;
Cakephp2 folders

Cakephp2 folders for app

Step 2: Test installation

Ensure the web server is running, and open a web browser to that installation. E.g. http://localhost/cakephp-2.5.6/

It should appear with a page similar as below;

Step 3: Post installation

Follow instructions given at the test page to rectify any errors/recommendations. E.g.
  1. Change value of Security.salt in core.php file
  2. Change value of Security.cipherSeed in core.php file
  3. Configure to use a database in database.php
  4. Install the DebugKit
Note:
Its made easy to migrate from CakePHP 1.3 to 2.5. Good read on upgrading of 1.3 to 2 (in no particular order)
  1.  stacks
  2. Upgrade to CakePHP 2.
  3. CakePHP Migration.
  4. Authentication.

1 comment:

Anonymous said...

Debian is a much better option than CentOS for CakePHP. Package management on Debian is way better than on CentOS. Debian also get updates regularly. They immediately patched the DirtyCow bug recently. Also, installing CakePHP on debian is easier if you use a PaaS. Here is an example: https://www.cloudways.com/blog/install-cakephp-on-cloud/

Blog Archive