Home > cakePHP, Ubuntu > How to install CakePHP Console on Ubuntu

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
Categories: cakePHP, Ubuntu
  1. David
    May 24, 2010 at 2:32 am | #1

    Thanks

  2. June 21, 2010 at 7:32 pm | #2

    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

    • June 21, 2010 at 7:49 pm | #3

      The previous script dont work,
      this one works:

      #!/bin/bash
      clear

      LIB=”/usr/share/php/cake/console/”
      APP=`pwd`

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

      exit;

  3. Aj
    July 31, 2010 at 7:22 am | #4

    Thank you!

  4. David
    February 20, 2011 at 8:54 am | #5

    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.

    • David
      February 20, 2011 at 9:00 am | #6

      Oups, forgot something, don’t forget to pass the arguments to the script ;)

      #!/bin/sh
      /usr/share/php/cake/console/cake $@

  5. Jim Parker
    February 17, 2012 at 10:27 am | #7

    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;

  1. No trackbacks yet.

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

Follow

Get every new post delivered to your Inbox.

Join 79 other followers

%d bloggers like this: