Apr 13th, 2009
Install Zend Optimizer on Ensim Pro server for Linux
The following post will explain HOW-TO install Zend Optimizer on a Ensim PRO server and have it enabled for the current and new domains.
1. Download Zend Optimizer.
-
cp /etc/php.ini /etc/php.ini.backup
-
cd /usr/local/src
-
wget http://www.serverbuddies.com/files/ZendOptimizer-3.3.0a-linux-glibc21-i386.tar.gz
-
tar zxvf ZendOptimizer*
-
cd ZendOptimizer*
-
./install
You’ll be asked the following questions, answer them with the following:
#Specify the location where to install Zend Optimizer:
/usr/local/Zend
#Confirm the location of your php.ini file:
/etc
#Are you using the Apache webserver?
Yes
#Specify the Apache configuration directory:
/etc/httpd/conf
#The install script should now detect the right Version of PHP.
Choose “Yes” to proceed.
#Specify the Apache bin directory:
/usr/sbin
After that, your php.ini is automatically relocated to /usr/local/Zend/etc and a symlink is created.
#Do you want to restart Apache Webserver
Choose “No”.
#Restart Apache
-
service httpd restart
Zend Optimizer should be fully installed by now.
After installing Zend Optimizer copy it to the high security site:
-
cp -r /usr/local/Zend/ /home/virtual/site#/fst/usr/local/Zend/
Now lets load it in:
-
pico -w /home/virtual/site#/fst/etc/php.ini
On the bottom paste this:
-
[Zend]
-
zend_optimizer.optimization_level=15
-
zend_extension_manager.optimizer=/usr/local/Zend/lib/Optimizer-3.3.0
-
zend_extension_manager.optimizer_ts=/usr/local/Zend/lib/Optimizer_TS-3.3.0
-
zend_optimizer.version=3.3.0a
-
zend_extension=/usr/local/Zend/lib/ZendExtensionManager.so
-
zend_extension_ts=/usr/local/Zend/lib/ZendExtensionManager_TS.so
Save the file and exit.
2. Once you save that file, create tar file using following command.
# tar cf virtDomain.tar /usr/local/Zend (Assuming that Zend has been installed at default location - /usr/local/Zend)
3.Copy this tarball to /etc/appliance/customization
4.Download the custom script named virtDomain.sh and editVirtDomain.sh and upload it to /etc/appliance/customization
-
cd /etc/appliance/customization
-
wget http://download.swsoft.com/ensim/download/pro/linux/kb/2800/virtDomain.sh
-
wget http://download.swsoft.com/ensim/download/pro/linux/kb/2800/editVirtDomain.sh
Note : you need to replace Zend Extension part with one copied from /usr/local/Zend/etc/php.ini in the attached scripts.
6.
-
chmod 755 /etc/appliance/customization/virtDomain.sh
-
chmod 755 /etc/appliance/customization/editVirtDomain.sh
Now all new domain created on server with any security level will be Zend enabled. If you want existing domain with high security to be zend enabled then you just need to re-save the site from Webppliance.