It’s not easy to install ZurmoCRM and that’s why I encourage beginners to Test your ZurmoCRM with VirtualBox. Although it is much faster than start from scratch, it is not perfect. You may need to modify some configurations and install extra package to keep it stable and accelerate performance.
This post will be updated when I found more optimization in the future.
Basic TurnKey ZurmoCRM 13.0 Configurations
If you preferred to keep it simple and don’t want to install any extra packages, you might need to edit following configurations.
- Increase memory_limit in php.ini to 256.
- Increase post_max_size in php.ini to 20M.
- Increase upload_max_filesize in php.ini to 20M.
- Increase max_execution_time in php.ini to 2000.
Restart Apache to take effect.
root@zurmo ~# /etc/init.d/apache2 restart
Upgrade to Latest ZurmoCRM
Please refer to “Upgrade ZurmoCRM in TurnKey VM” and following steps to upgrade to the latest version.
Or you may just upload the latest ZurmoCRM to replace the /var/www/zurmo folder. Change the owner of this folder to www-data and config it again.
root@zurmo /var/www# chown www-data:www-data zurmo -R
Install and Enable APC Extension
The original package doesn’t contain Alternative PHP Cache aka APC. It may cache and optimize PHP intermediate code.
You may install APC with apt-get and restart Apache to take effect. During installation, it will ask to remove php5-xcache which is the build-in PHP accelerator in TurnKey Linux.
root@zurmo ~# apt-get update root@zurmo ~# apt-get install php-apc root@zurmo ~# /etc/init.d/apache2 restart
To improve stability and performance, please increase apc.shm_size in apc.ini to 96M or higher. With less than 96MB, you might see a page display error message “include(): Unable to allocate memory for pool.” while saving any records. According to a “Twitter by Dan O’Brien @ abend0c4 18 Oct 2012”, it is related apc.shm_size.
More information about APC configuration may be found in “The Perfect APC Configuration” by Greg Rickaby.
Install and Enable Memcache Extension
The original package doesn’t contain Memcache. It is an PHP interface to memcached service which will cache database result and lower database loading.
You may install Memcache with apt-get and restart Apache to take effect.
root@zurmo ~# apt-get update root@zurmo ~# apt-get install php5-memcache root@zurmo ~# /etc/init.d/apache2 restart root@zurmo ~# /etc/init.d/memcached restart
To improve performance, increase cache memory in memcached.conf with -m 128 for 1GB and -m 256 for 2GB installed.
Use ps -aux | grep memcached to confirmed it has been loaded into memory successfully.
Enable APC Extension After Installation
When ZurmoCRM detects APC, it will use automatically. Or you may check if $phpLevelCaching in [where you installed ZurmoCRM]/app/protected/config/debug.php is set to true.
Unless you need to disable APC during debug, please keep it true.
Enable Memcahe Extension After Installation
If you install Memcache after setup configuration, you need to manually edit memcached information in [where you installed ZurmoCRM]/app/protected/config/perInstance.php. It should match to parameters used to launch memcached service.
$memcacheServers = array( // An empty array means memcache is not used. array( 'host' => '127.0.0.1', 'port' => 11211, // This is the default memcached port. 'weight' => 100, ), );
Please check if $memcacheLevelCaching in [where you installed ZurmoCRM]/app/protected/config/debug.php is to true, too.
Security Update
It is very important to regular check any security patch for you TurnKey Linux. Run following command to check or add in to cron. You may find more related information at Automatic security updates on TurnKey Linux.
root@zurmo /# install-security-updates
Some patch are not automatically update, you should also pay attention to security leaks sites and news.
Notes
- Size for apc.shm_size and memcached may vary depends on systems environments and usage scenario.
- If you use less than 900 in max_execution_time, you might fail to install demo data on processor slower than Intel Atom D2700 . You may set it to a smaller number than 2000 after installation.
- If you are looking for files, please read TurnKey Linux Configuration and Executable Files.
- If you are not sure for package name, use apt-cache search [name] to search for possible match.
Reference
- Apache
- Asustor ADM
- Greg Rickaby: The Perfect APC Configuration
- HowtoForge: Install Memcached And PHP5-MemCached Module On Debian 6.0 (Squeeze)
- Intel Atom Processor D2700
- memcached
- Oracle: Docs: 15.6.2 Using memcached
- PHP: Alternative PHP Cache
- PHP: PHP Manual: Appendices: php.ini directives
- PHP: PHP Manual: Appendices: php.ini directives: max_execution_time
- PHP: PHP Manual: Appendices: php.ini directives: memory_limit
- PHP: PHP Manual: Appendices: php.ini directives: post_max_size
- PHP: PHP Manual: Appendices: php.ini directives: upload_max_filesize
- PHP: PHP Manual: Function Reference: Affecting PHP’s Behavior: APC: Installing/Configuring: Runtime Configuration
- PHP: PHP Manual: Function Reference: Affecting PHP’s Behavior: APC: Installing/Configuring: Runtime Configuration: apc.shm_size
- PHP: PHP Manual: Function Reference: Date and Time Related Extensions: Date/Time: Installing/Configuring: Runtime Configuration: date.timezone
- PHP: PHP Manual: Function Reference: Other Services: Memcache
- Test your ZurmoCRM with VirtualBox
- TurnKey Linux
- TurnKey Linux Configuration and Executable Files
- TurnKey Linux Forums: Support: [Solved] Upgrading Magento (how to?)
- TurnKey Linux: Automatic security updates
- TurnKey Linux Zurmo
- Twitter by Dan O’Brien @ abend0c4 18 Oct 2012
- Upgrade ZurmoCRM in TurnKey VM
- Web Developer Juice: 10 baby steps to install Memcached Server and access it with PHP
- Wiki: LAMP (software bundle)
- Wiki: List of PHP accelerators
- ZurmoCRM
- Zurmo: Forums: Enable Memcache after install
- Zurmo: Zurmo Cache System Explained