Standard Procedures for CakePHP Application Deployment
1. Clone Source File
git clone <git url>
2. Setup Database
mysql -uroot -p
create database <database name>;
grant all on <database name>.* to '<id>'.'localhost' identified by '<password>';
cd <path/to/cakephp>/app
Console/cake schema create
Console/cake schema update -s <update number found in app/Config/Schema/>
3. Setup PHP
Edit /etc/php.ini
and add the following line:
date.timezone = "Asia/Kuala_Lumpur"
4. Allow Write Access to tmp
chmod -R 777 app/tmp/
5. Setup Apache
Edit /etc/httpd/conf/conf.d
and change AllowOverride None
to AllowOverride All
in <Directory "/var/www/html">
tag. Then, restart httpd:
sudo systemctl restart httpd
(OPTIONAL) SELinux
sudo setsebool -P allow_httpd_anon_write on
sudo setsebool -P allow_httpd_sys_script_anon_write on
sudo setsebool -P httpd_unified 0
sudo chcon -R -t httpd_sys_rw_content_t <path_to_cakephp_app>/app/tmp/
No Comments