![]() |
HOWTO: PHP eAccelerator on Ensim
HOWTO: PHP eAccelerator on Ensim
--------------------------------- eAccelerator (http://eaccelerator.net) is a branch or extension of Turck MMCache (http://turck-mmcache.sourceforge.net/index_old.html), which as far as I know is no longer developed or supported. This is a PHP accelerator, which compiles and caches php scripts in shared memory, eliminating the need to read, parse and interpret every PHP script for every request. So far i've installed this on RHEL/Ensim/PHP4, RHEL/PHP4 and RHEL/PHP5 boxes without incident. The improvement is amazing, especially if your server is already highly loaded, and you or your clients run alot of PHP scripts. These instructions are specifically for Ensim Pro w/PHP4, although they can easily be extended to basic RHEL, and probably Plesk or Cpanel with some minor tweaking. 1) Install php-devel Code:
2) Download and extract the software from http://sourceforge.net/project/show...roup_id=122249: Code:
3) Build eaccelerator Code:
And if all of that went well then: Code:
4) Generate an admin password. This is imperative if you use shared hosting, otherwise any of your clients can access eAccelerator controls if they know how! Code:
Don't restart httpd yet as it directs, just copy the bottom two lines and put them somewhere temporarily, we'll use them in step 6. 5) Create the cache directory. Code:
The suggested location of the tmp dir is /tmp/eaccelerator . I don't exactly know the security implications of storing the cache for all shared hosting clients in an open directory, I imagine there is some. If one client can read the cached files of other clients, they could be decoded to potentially reveal embedded passwords in config files and such. Other than setting the cache directory on a per-site basis I don't know a workaround. It would probably be a good idea to use a directory outside of /tmp with a random name. Perhaps someone else could shed some light on this? 6) Edit php.ini - open /etc/php.ini with your text editor of choice (vi, pico, nano, etc). - Find the following at approximately the middle of the file: Code:
Add this: Code:
cache_dir, admin.name, and admin.password are the values from the steps above. Don't simply copy/paste without changing those values! These are default options, which work pretty well, for info on these and more settings, see http://eaccelerator.net/IniSettingsUk or read the README file at /root/eaccelerator*/README . 7) Copy the admin script and make a phpinfo script: Code:
8) Re-start httpd Code:
9) Make sure it's working. Go to http://your-server-domain-or-ip/phpinfo.php and look for "Zend Technologies with eAccelerator" in the credits, and an eAccelerator section. Go to http://your-server-domain-or-ip/eaccelerator.php and see your cache info and options. |
Works like a charm - thanks for a super clear tutorial.
|
it doesnt work with cgi mode (high security). What a shame.
|
Works fine, thanks a lot for the HOWTO dillybar1.
Hence, a couple of issues. I installed the eaccelerator on a test server (as root) and it runs like a charm. Now settings are global meaning every single chrooted site also uses the eaccelerator and all of the cached files are written to one single directory (in my case for test purposes /var/cache/eaccelerator ). If for some reason a single site would need to purge his cache this will affect every single site on the server. Same goes for the admin logon and password. Knowing the Ensim sites are chrooted in /home/virtual/<sitename> I'd rather prefer having the cache files for each site stored in their respective virtual filesystem. Fiddeled a bit around with both global and local php.ini file but no way to make it work that way. If someone has an idea or solution? |
Hello, may you help me?
I'm installing eAccelerator. After I enter line "$PHP_PREFIX/bin/phpize" I got next: Quote:
Is it ok? I tried to continue installation, but eAccellerator wann't work. |
I get the exact same message
My OS is CentOS and I have cpanel with whm . Its up to date. I get that exact message and am unable to install. There are three php.ini files on is isn /etc and the others are in /usr/local and /usr/local/lib I think. What am I supposed to do with the three php.ini or which one do I use.
|
Why dont you try this precompiled rpm from DAG:
http://dag.wieers.com/packages/php-eaccelerator/ They publish frequent updates to their packages, and I use several of their packages on my centos servers (and rhel servers) but they also compiles for fedora. spamassassin tnef clamav eaccelerator and several others are much more updated than the ones on centos. |
All times are GMT -6. The time now is 06:31 AM. |
Powered by: vBulletin Version 3.0.7
Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.