Steps are almost same but in Windows we did that using GUI or in Windows Explorer and in Ubuntu we'll do it through terminal or you can say using commands.
Step 1: Open the command prompt (terminal) and type the following command
Step 2: Type the below command to download the cakephp.
$ sudo wget https://codeload.github.com/cakephp/cakephp/legacy.zip/2.5.2
where 2.5.2 is the latest stable version of CakePHP.
Step 3: Use the following command to unzip the downloaded zip file.
$ sudo unzip 2.5.2
Step 4: Rename extracted folder.
$ mv cakephp-cakephp-736e999/ cake
where cakephp-cakephp-736e999 is the name of extracted folder.
To run CakePHP on browser use this path localhost/cake.
Step 5: Go to cake folder.
$ cd cake
And change permissions to app/tmp folder.
$ sudo chown -R root:www-data app/tmp
$ sudo chmod -R 775 app/tmp
Step 6: To make script writable perform these steps:
$ apache2ctl -M
If you see mod_rewrite or rewrite_module in the list shown then script is writable. If not then to enable it type this command:
$ a2enmod rewrite
Step 7: Type:-
$ sudo nano apache2.conf
Set these lines in the file:
Option Indexes FollowSymlinks
Required all granted
Press Ctrl+X, then press Y and Enter to save the file.
$ sudo service apache2 restart
Step 8: Now go to app/Config and:
$ cd /var/www/html/cake/app/Config
$ sudo mv database.php.default default.php
Refresh localhost/cake page. Now database file is detected but still we have to create a database as it will show could not connect to database.
Step 9: Open localhost/phpmyadmin on browser. Login using your username and password and create a database named as cake. After this edit database.php file.
$ sudo nano database.php
Set host as localhost, username is your phpmyadmin username, password is your phpmyadmin password and database name.
Refresh localhost/cake page. Now database is detected.
Step 10: To remove the salt and seed error shown on top of the localhost/cake page we have to edit core.php file.
$ sudo nano core.php
Find this section and replace both the strings with any random strings or you can use these strings also.
/* A random string used in security hashing methods. */
/* A random numeric string (digits only) used to encrypt/decrypt strings. */
Then press Ctrl+X, press Y and Enter to save file.
Refresh localhost/cake page. And its done.