How to install CakePHP Console on Ubuntu

Install CakePHP Console script on Ubuntu

It’s very easy to install the new update of the cakePHP framework on Ubuntu.

1. Download the latest copy of the cakePHP (currently 1.3.0)

2. Extract it in to administrator directory (it is the easiest for a beginner) – rename and make it’s path like /home/administrator/cake. then you will have all the stuff coming with the cakePHP bundle.

3. Make a directory on following path by using the command by running a terminal, if it ask for the password give it.

sudo mkdir /usr/share/php/cake

4. then simply run following command

sudo cp -R ~/cake/cake* /usr/share/php

5. Now you will see that in the /usr/share/php/cake directory will having some files.

6. then just run the following command

cake


Thats all now you can bake your new cake. For future updates just do above steps.

About these ads

7 thoughts on “How to install CakePHP Console on Ubuntu”

  1. To Complement:

    To be able to call the command “cake” you must have a script
    in /usr/bin/cake

    to create follow these steps:
    create the file:
    $ sudo vim /usr/bin/cake

    and write this code:
    #!/bin/sh
    /usr/share/php/cake/console/cake

    and give permission to execute
    $ sudo chmod +x /usr/bin/cake

  2. You also have to give permission to execute to /console/cake :

    sudo chmod +x /usr/share/php/cake/console/cake

    and it should work well. That way, if you update cake and the shell changes, you’ll be fine.

  3. Thanks for the help!!

    This worked for CakePHP 2.0.6 on Ubuntu 10.04 server

    #!/bin/sh
    /usr/share/php/cake/app/Console/cake $@
    clear
    LIB=”/usr/share/php/cake/app/Console/”
    APP=`pwd`

    exec php -q ${LIB}cake.php -working “${APP}” “$@”
    exit;

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