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 ADM.
Launch and Create MySQL Database
You need to enable MySQL server in Services→MySQL Server→Enable MySQL Server. The default password for root is admin. Next to use SSH login to ADM as root and execute following command to create a MySQL 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 MySQL 5.5 Reference Manual.
mysql -u root --password=admin -e "CREATE DATABASE zurmo COLLATE = utf8_unicode_ci"
For those not familiar with Linux commands, install phpMyAdmin from App Central and login with the same account as MySQL in your browser. Choose Database tab to create a database.
Enable and Increase Default APC
Open Services→Web Server and click on Web Server tab. Make sure Enable PHP cache is tick and the Size is set to 128M. It will increase apc.shm_size in apc.ini to 128M.
If it is less than 128M, 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.
Increase max_execution_time on Slow Machine
ZurmoCRM needs about 12 minutes to install demo data on Atom. Therefore, please increase max_execution_time to 2000 /raid/module/apache/sys/etc/php.ini before first-time configuration because it takes longer than default to install demo data.
Load memcached
Make sure memcached is running before first-time-configuration. The LAMP in ADM 2.1 comes with Memcache which is an interface for PHP to communicate with memcached. But ADM doesn’t provide any graphical tools nor load memcached during boot time, you need to load it manually.
memcached -u admin -l 127.0.0.1 -P 11211 -m 128 -d
If you need a script to load it automatically during boot time, [HOW TO] Run your own script on system startup on Asustor Community Forum provides a very detail explain. Just create a shell script containing above command with the right naming convention, eg. S90memcached.sh, and put it in /usr/local/etc/init.d/.
Security
It would be a good idea to create another MySQL 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 ADM 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.
/volume0/usr/builtin/etc/init.d/S54apache2 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 an APC issue. Please increase apc.shm_size to greater than 96MB. Refer to Enable and Increase Default 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 Load memcached section of this post for detail explain.
More Information
I list some useful resource here to help you fine tune your LAMP on ADM.
- phpinfo() Reports on NAS
- Asustor ADM Configuration and Executable Files
- Optimize Asustor ADM for ZurmoCRM
If you need a reference about performance, following post might be useful.
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.
Reference
- Apache
- AskUbuntu: How to run mysql command from terminal?
- Asustor ADM
- Asustor ADM Configuration and Executable Files
- Asustor AS-602T as a ZurmoCRM Application Server Performance Report
- Asustor Community Forum: [HOW TO] Run your own script on system startup
- Greg Rickaby: The Perfect APC Configuration
- How Multi-Core Processors Accelerate your LAMP Applications
- I-ON-RAILS: Creating a MySQL Database from Terminal or Command Line
- memcached
- MySQL
- MySQL: MySQL 5.5 Reference Manual :: 13 SQL Statement Syntax :: 13.1 Data Definition Statements :: 13.1.10 CREATE DATABASE Syntax
- Optimize Asustor ADM for ZurmoCRM
- phpMyAdmin
- 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
- phpinfo() Reports on NAS
- Synology Security Issue and How-to Harden your NAS
- Twitter by Dan O’Brien @ abend0c4 18 Oct 2012
- Wiki: LAMP (software bundle)
- Wiki: Multi-core processor
- Wiki: Session (computer science)
- ZurmoCRM