First lookup the latest PHP eAccelerator source distribution from here.
My downloaded version is eaccelerator-0.9.5.2.tar.bz2
Then:
$ tar -jxvf eaccelerator-0.9.5.2.tar.bz2after the last command, it shows this line:
$ cd eaccelerator-0.9.5.2
$ phpize
$ ./configure
$ make
$ make install
Installing shared extensions: /usr/lib/php/modules/
Now we edit php.ini
$ nano /etc/php.iniand add these line:
after saving the php.ini, I created temp folder for the eacceleratorextension="eaccelerator.so"
eaccelerator.shm_size=”16″
eaccelerator.cache_dir=”/tmp/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″
$ mkdir /tmp/eaccelerator
$ chmod 777 /tmp/eaccelerator
then restart the httpd:
$ httpd -k restart
to manage eAccelerator, I copied control.php
cp /usr/src/eaccelerator-0.9.5.2/control.php /path/to/my/homepage/control.php
when I tried to browse http://comp1/control.php, it asked for password, the default is :
Username : admin
Password : eAccelerator
but then I got "This script isn't in the allowed_admin_path setting" error in some area of the page. After took a peak on my ubuntu server configuration that already running eAccelerator, I added "eaccelerator.allowed_admin_path="/path/to/my/homepage"" so my php.ini now look like this :
extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/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"
eaccelerator.allowed_admin_path="/path/to/my/homepage"
save the php.ini, then restart the httpd:
now I can login and manage the eAccelerator$ httpd -k restart
No comments:
Post a Comment