Installation is actually quite an easy task. But I couldn’t find good information at the beginning. So here I am writing for you. I am using Ubuntu 9.10. This will work for any *nix systems.
Step 1:
In order to work with cakephp you need to have Apache server , MySql Database and PHP. To get themsudo apt-get install apache2 mysql-server php5
Step 2:
Download the Latest version or the stable version of Cakephp. You can get it from here downloadI am using 1.2 version of cakephp
Step 3:
Copy and Extract the compressed file to the webroot(/var/www) and rename to cakephp or some project_name. Open http://localhost/cakephp in your browser. You will see something like this.Step 4:
Enable write permission for app/tempsudo chmod -R 777 cakephp/app/tmp
Step 5:
Enable mod_rewrite. More about mod_rewrite here.sudo a2enmod rewrite
Step 6:
Edit the file /etc/apache2/sites-enabled/000-default and change AllowOverride None to AllowOverride All. You can use any text editor. I am using vi editor.sudo vi /etc/apache2/sites-enabled/000-default
<Directory /var/www>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
Step 7:
Changing the value of security.salt in app/config/core.php. At line 151 or near to it you can see something like thisConfigure::write(‘Security.salt’, ‘DYhG93b0qyJfIxfs2guVoUubWwvniR2G0FgaC9mi’);
Just change the value of it.I have come up with this value
Configure::write(‘Security.salt’, ‘UubWwvniR2G0FgaC9miDYhG93b0qyJfIxfs2guVo’);
Step 8:
Database Configuration. The database configuration file is located at cakephp/app/config/database.php.defaultchange the file name to database.php
sudo mv database.php.default database.php
Then edit the following
sudo vi cakephp/app/config/database.php
class DATABASE_CONFIG {
var $default = array(
'driver' => 'mysql',
'persistent' => false,
'host' => 'localhost',
'login' => 'root',
'password' => 'sudeep',
'database' => 'cakephp',
'prefix' => '',
);
You can connect to any database you want. Make sure that username and password of your database are correct.
Step 9:
Restart Apache server to see changessudo /etc/init.d/apache2 restart
No comments:
Post a Comment