How to install eAccelerate on Ubuntu 8.04?

How to install eAccelerate on Ubuntu 8.04?

by Roland Sherwood -
Number of replies: 8
Hi,

Just a quick query: I'd like to install eAccelerate on our Ubuntu 8.04 server in the hope it will improve Moodle's performance. Having Googled, I've found a number of sites which detail eAccellerator's installation, such as:

http://blog.mhauden.net/moodle/TweaksAndHacks
http://developer.mindtouch.com/Deki/FAQ/Configuration/How_do_I...Install_eAccelerator_on_Ubuntu_8.04_(Debian)

But I'd like to ask is that all there really is to it?! The reason I have my doubts is because of this thread...

http://moodle.org/mod/forum/discuss.php?d=86261

...which seems to indicate that the installation procedure is somewhat more complicated than previously described (in particular, I'm not sure what all the stuff about rcache and shmem refers to).

Could anyone confirm that following that following the procedure detailed in the first link is the correct way to go about it? Also, when (and if!) I have eAccelerator installed, is it simply a matter of selecting the eAccelerator option from Moodle's Server > Performance > Cache type menu to activate eAccelerator's use by Moodle?

Any help very gratefully received!
Average of ratings: -
In reply to Roland Sherwood

Re: How to install eAccelerate on Ubuntu 8.04?

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hi there, you can install xcache straight from the Ubuntu repositories rather than compiling yourself (http://packages.ubuntu.com/hardy/php5-xcache). Although I could not comment on which was more effective... Perhaps someone else has experience of both packages and can offer some more advice...
In reply to Roland Sherwood

Re: How to install eAccelerate on Ubuntu 8.04?

by Greg Lund-Chaix -
I don't have any experience with eAccelerator, but we run APC on all 300 of our servers. I won't run a PHP server without it. It does wonders for performance.

It's in the Ubuntu universe repositories, so you can install it with a simple "apt-get install php-apc". You might need to tweak the apc.ini file in /etc/php/cgi-php5/ext/ to match your RAM, but the defaults are generally safe and sane.

-Greg
In reply to Greg Lund-Chaix

Re: How to install eAccelerate on Ubuntu 8.04?

by Jon Witts -
Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Greg,

I think APC did not come into the Ubuntu repositories until 8.10... http://packages.ubuntu.com/intrepid/php-apc

Jon
In reply to Jon Witts

Re: How to install eAccelerate on Ubuntu 8.04?

by Greg Lund-Chaix -
Crud ... thanks, Jon. I run my dev environment in Ubuntu, but my production stuff is on Gentoo.

-Greg
In reply to Greg Lund-Chaix

Re: How to install eAccelerate on Ubuntu 8.04?

by Jörg S. -
Hi,

I'm going to turn on APC, too. But - what kind of cache-options have you turned on in Moodle itself?

Jörg
In reply to Roland Sherwood

Re: How to install eAccelerate on Ubuntu 8.04?

by Roland Sherwood -
Thanks for the replies all!

After much head-scratching and Googling, I finally managed to figure things out - with the result that eAcellerator is now installed and humming along nicely on our server.

Just in case there's anyone out there in the same boat, here's what worked for us (on an Ubuntu 8.04, Moodle 1.9.5, PHP 5.2.4 machine):

- sudo apt-get install autoconf automake make libtool m4 php5-dev (dependencies necessary for installation)
- cd /tmp
- sudo wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2 (**check eAccelerator homepage for new version availability first**)
- tar xvfj eaccelerator-0.9.5.3.tar.bz2
- cd eaccelerator-0.9.5.3
- phpize
- ./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config --with-eaccelerator-shared-memory --with-eaccelerator-sessions --with-eaccelerator-content-caching
- make
- sudo make install (**run make test first, if desired**)
- sudo nano /etc/php5/apache2/php.ini
- add the following lines at end of file:

extension="eaccelerator.so"
eaccelerator.shm_size="50"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

- save and exit
- sudo mkdir /var/cache/eaccelerator
- sudo chown -R www-data.www-data /var/cache/eaccelerator
- sudo chmod 0644 /var/cache/eaccelerator
- sudo /etc/init.d/apache2 restart
- select cachetype as 'eaccelerator' and rchache as 'yes' under Server > Performance

Hope this helps someone!
Average of ratings: Useful (1)
In reply to Roland Sherwood

Re: How to install eAccelerate on Ubuntu 8.04?

by Roland Sherwood -
Thanks for the replies all!

After much head-scratching and Googling, I finally managed to figure things out - with the result that eAcellerator is now installed and humming along nicely on our server.

Just in case there's anyone out there in the same boat, here's what worked for us (on an Ubuntu 8.04, Moodle 1.9.5, PHP 5.2.4 machine):

- sudo apt-get install autoconf automake make libtool m4 php5-dev (dependencies necessary for installation)
- cd /tmp
- sudo wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2 (**check eAccelerator homepage for new version availability first**)
- tar xvfj eaccelerator-0.9.5.3.tar.bz2
- cd eaccelerator-0.9.5.3
- phpize
- ./configure --enable-eaccelerator=shared --with-php-config=/usr/bin/php-config --with-eaccelerator-shared-memory --with-eaccelerator-sessions --with-eaccelerator-content-caching
- make
- sudo make install (**run make test first, if desired**)
- sudo nano /etc/php5/apache2/php.ini
- add the following lines at end of file:

extension="eaccelerator.so"
eaccelerator.shm_size="50"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"

- save and exit
- sudo mkdir /var/cache/eaccelerator
- sudo chown -R www-data.www-data /var/cache/eaccelerator
- sudo chmod 0644 /var/cache/eaccelerator
- sudo /etc/init.d/apache2 restart
- select cachetype as 'eaccelerator' and rchache as 'yes' under Server > Performance

Hope this helps!