Thursday, December 11, 2008

Lighttpd eaccelerator support



This is a highly recommended setup for your nslu2. As your slug has very limited resources you better install this to make it run pages faster. You will notice the difference if you are running a content management system. Run the codes below step by step to install eaccelerator on your system. It is basicly a caching We are not using apt-get this case as it debain has no package for this.
apt-get install build-essential php5-dev
mkdir work
cd work
wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2
tar xvfj eaccelerator-0.9.5.3.tar.bz2
cd eaccelerator-0.9.5.3
phpize
./configure --with-eaccelerator-userid=nobody
make
make install
Create eaccelerator.ini file
touch /etc/php5/conf.d/eaccelerator.ini
copy these into the file
extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/var/cache/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.d****="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"
As you see, we are using the disk cache directory /var/cache/eaccelerator which we must create now and make it world-writable:
mkdir -p /var/cache/eaccelerator
chmod 0777 /var/cache/eaccelerator
then restart the server
/etc/init.d/lighttpd restart
After the restart the server if you write http://192.168.1.77/info.php and go the the info page you should see a new block like

No comments:

Post a Comment