Prerequisite Before you Install ZurmoCRM on Synology NAS running DSM 5.0


Before you install ZurmoCRM, please make sure you have meet the LAMP requirements. They will help ZurmoCRM to run faster and more responsive on your DSM.

Launch and Create MySQL Database

You need to install MariaDB by installing from Package Center. The default password for root is empty string which means just leave password blank. Next to use SSH login to DSM as root and execute following command to create a MariaDB database with COLLATE = utf8_unicode. It is okay to use a different database name to replace zurmo. You may learn more about the SQL syntax in MariaDB Documentation: SQL Commands.

mysql -u root --password=admin -e "CREATE DATABASE zurmo COLLATE = utf8_unicode_ci"

For those not familiar with Linux commands, install phpMyAdmin from Package Center and login with the same account as MariaDB in your browser. Choose Database tab to create a database.

PHP 5.5 OPcache and APC

Alternative PHP Cache is replaced by OPcache now. You will need APCu to provide user cache compatibility to APC which is included in DSM 5.0.

Open Control Panel→Web Services→PHP Settings tab and click on Enable PHP cache. Click on Apply to confirm.

Because the default opcache.memory_consumption in DSM 5.0 is 128MB, you shall not 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 happens when apc.shm_size is less than 96MB.

If you want to modify manually, edit opcache.memory_consumption in /etc/php/conf.d/opcache.ini.

It happens when apc.shm_size is smaller than 96MB.
It happens when apc.shm_size is less than 96MB.

No memcached

There is no memcached in DSM 5.0 but is available in 4.3. You might see pefromance degradation due to missing database memory cache.

Security

It would be a good idea to create another MariaDB account for ZurmoCRM to access its own database. Using the same root account is convenient but risky. Synology Security Issue and How-to Harden your NAS explains how to enable security settings in DSM to increase protection.

FAQ

Where can I download the latest package?

You may download from my dropbox link.

It would be nice of you if you use my referral link to register a Dropbox account. Both of us will get extra 500MB of bonus space.

Why I only see a blank page?

Your browser fails to load the page. Please clear your browser cookie or restart Apache with following command.

/usr/syno/etc/rc.d/S97apache-sys.sh restart

In some case, it is due to privilege issue. You need to use chown to change the owner of zurmo folder to the same user runs Apache.

Why it fail to save and display “include(): Unable to allocate memory for pool.”?

It is APC issue. Please increase opcache.memory_consumption to greater than 96MB. Refer to PHP 5.5 OPcache and APC section of this post for detail explain.

Why I see “Error code: 111 Message(Memcached): Connection refused” when I push [Install] button during configuration?

Because memcached is not loaded. Refer to No memcached section of this post for detail explain.

More Information

I list some useful resource here to help you fine tune your LAMP on DSM.

  1. phpinfo() Reports on NAS
  2. Synology DSM Configuration and Executable Files
  3. Optimize Synology DSM for ZurmoCRM

If you need a reference about performance, following post might be useful.

  1. Asustor AS-602T as a ZurmoCRM Application Server Performance Report. An Intel Atom D2700 NAS with DSM 5.0 should be similar to Asustor AS-602T with PHP 5.5.3 R2.

The last is about the session and multi-core processor in LAMP. It helps you to know why only one core is serving you when login to ZurmoCRM.

  1. How Multi-Core Processors Accelerate your LAMP Applications

For those interested in the new OPcache with APCu to replace Alternative PHP Cache, following information might interest you.

  1. Situation as of PHP v5.5 in Getting the Most out of APC for Yii.
  2. Caching – Apc Extension on Yii Framework Forum.
  3. How to use PHP OPCache? on StackOverflow.

Reference

  1. Apache
  2. AskUbuntu: How to run mysql command from terminal?
  3. Asustor ADM Configuration and Executable Files
  4. Asustor AS-602T as a ZurmoCRM Application Server Performance Report
  5. Asustor: AS-602T
  6. I-ON-RAILS: Creating a MySQL Database from Terminal or Command Line
  7. Intel Atom Processor D2700
  8. How Multi-Core Processors Accelerate your LAMP Applications
  9. memcached
  10. MariaDB
  11. MariaDB: MariaDB Documentation: SQL Commands
  12. MySQL: MySQL 5.5 Reference Manual :: 13 SQL Statement Syntax :: 13.1 Data Definition Statements :: 13.1.10 CREATE DATABASE Syntax
  13. Optimize Asustor ADM for ZurmoCRM
  14. Optimize Synology DSM for ZurmoCRM
  15. PECL: Package: APCu
  16. PHP: Alternative PHP Cache
  17. PHP: OPcache
  18. PHP: PHP Manual: Function Reference: Affecting PHP’s Behavior: APC: Installing/Configuring: Runtime Configuration: apc.shm_size
  19. PHP: PHP Manual: Function Reference: Affecting PHP’s Behaviour: OPcache: Installing/Configuring: opcache.memory_consumption
  20. phpinfo() Reports on NAS
  21. phpMyAdmin
  22. StackOverflow: How to use PHP OPCache?
  23. Synology DSM
  24. Synology DSM Configuration and Executable Files
  25. Synology Security Issue and How-to Harden your NAS
  26. Twitter by Dan O’Brien ‏@ abend0c4 18 Oct 2012
  27. Wiki: LAMP (software bundle)
  28. Wiki: Multi-core processor
  29. Wiki: Session (computer science)
  30. Yii Framework: Yii 1.1: Getting the Most out of APC for Yii
  31. Yii Framework: Forums: Caching – Apc Extension
  32. ZurmoCRM
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s