Home » » How to install Cakephp On Linux Mint

How to install Cakephp On Linux Mint

Written By nguyen ngoc hieu on Thứ Bảy, 21 tháng 9, 2013 | 00:27

You have installed CakePHP 2.0 framwork using steps below:

1. Start the terminal
2. sudo mkdir /var/www/cakephp
3. sudo cp -r ~/cakephp/* /var/www/cakephp

( 2 and 3 you can :
  2. http://cakephp.org ->Download cakephp_version_RC.tar/...
  3. Extract Here -> rename ->cakephp ,copy and pass "cakephp" go to path /var/www/
)

4. cd /var/www ,and change tmp folder permisssion:
sudo chmod -R 777 cakephp/app/tmp
sudo chmod -R 777 cakephp/app/tmp/cache
sudo chmod -R 777 cakephp/app/tmp/cache/persistent
sudo chmod -R 777 cakephp/app/tmp/cache/models
sudo chmod -R 777 cakephp/app/tmp/logs

5. Enable mod-rewrite :
sudo a2enmod rewrite
Open file /etc/apache2/sites-enabled/000-default and change AllowOverride None to AllowOverride All

6. sudo vim /etc/apache2/sites-enabled/000-default
Restart Apache

7. sudo /etc/init.d/apache2 restart

8. Create database in phpmyadmin : data_name : cakephp

9. Change name file "database.php.default" in /var/www/cakephp/app/Config => "database.php"

10. Edit file "database.php" :

public $default = array(
'datasource' => 'Database/Mysql',
'persistent' => false,
'host' => 'localhost', // host - doman website of you
'login' => 'root', // username login phpmyadmin
'password' => 'huy', // password login phpmyadmin
'database' => 'cakephp',// database
'prefix' => '',
//'encoding' => 'utf8',
);

11. Edit yourInstallation/app/config/core.php
search for Security.salt and change some random characters (this is so your application doesn't have the same security seed as a billion other installations, which would be a serious security loophole.
Do the same with Security.cipherSeed but use only numbers
save core.php
job done

12. Test: You opened your browser and typed address http://localhost/cakephp/


0 nhận xét:

Đăng nhận xét