Download the tarball from AUR or use your favorite tool for AUR.
./configure --without-eaccelerator-use-inode --prefix=/usr
I recommend that you do it anyway since future versions of eAccelerator won't be using inodes. You can fine more info here: http://eaccelerator.net/ticket/104#comment:13
Compile the package with
Enable it in PHP
Run the following command as root (note: make sure you use >> in the following command.)
cat /etc/php/conf.d/eaccelerator.ini >> /etc/php/php.ini
Edit /etc/php/php.ini and make the following changes:
- zlib.output_compression = On
Check if installation was ok
If installation was succesfull you should see something similar to the following:
Zend Engine v2.3.0, Copyright (c) 1998-2011 Zend Technologies with eAccelerator v0.9.6.1, Copyright (c) 2004-2010 eAccelerator, by eAccelerator
This will show eAccelerator has been loaded successfully, but this doesn't necessarily show that eAccelerator is working like it should. Load a php script running on your webserver in your browser. Assuming you didn't disable the filecache with shm_only = 1, a cached script should appear in the cache directory.
You could/should also check using phpinfo(). To do so add:
<?php phpinfo(); ?>
to a file and open it with your browser. eAccelerator should have its own section.
- Lighttpd_for_SSL_and_non-SSL#FastCGI_and_PHP_with_eAcceleration - helped me install eAccelerator and contains most of the above info and more.
- eAccelerator Wiki, Settings
- AUR Package and open_basedir fix info by furibondox in the comments
- eAccelerator info on open_basedir errors