Software Development
All about software development tricks on Linux
- Creating War File in Linux
- Standard Procedures for CakePHP Application Deployment
- Installing Clozure CL and QuickLisp on CentOS 7
Creating War File in Linux
- CD to war directory in the project folder
- Execute
jar -cvf .war *
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/
Installing Clozure CL and QuickLisp on CentOS 7
Download Clozure CL
Open up terminal and enter the command: svn co http://svn.clozure.com/publicsvn/openmcl/release/1.11/linuxx86/ccl
Where linuxx86
is one of:
darwinx86
linuxx86
freebsdx86
solarisx86
windows
linuxarm
Download and Install QuickLisp
- Download QuickLisp from https://beta.quicklisp.org/quicklisp.lisp
- Enter the command:
./ccl/lx86cl64 --load /path/to/quicklisp.lisp
- In the CCL prompt enter:
(quicklisp-quickstart:install)(ql:add-to-init-file)
Creating Scripts to Run CCL
- Edit
./ccl/scripts/ccl
and./ccl/scripts/ccl64
to changeCCL_DEFAULT_DIRECTORY=/usr/local/src/ccl
line toCCL_DEFAULT_DIRECTORY=~/ccl
- Copy the scripts to
/usr/local/bin
directory:sudo cp ./ccl/scripts/ccl* /usr/local/bin/