eAccelerator - PHP accelerator installed in Debian 5 (Lenny) and Ubuntu

eAccelerator - small program with great effect.

eAccelerator is a tool that accelerates the execution of PHP code under Apache. The code is already stored in a compiled state, so the compilation is eliminated almost entirely on each page request. The pre-compiled code is stored in shared memory and then called directly. Furthermore, the runtime is optimized to speed up the execution of PHP code.

Personal experiences with eAccelerator:

There we some time ago a slightly more affluent side hosts and we had quite a performance problem, the administrator gave me a friendly tip eAccelerator try. I was skeptical at first, and wrote down the exact loading of the page to after the installation of eAccelerator to have a comparison. The performance increase was in my case, after installing all 89.5%.

For eAccelerator Unfortunately there are no official packages under the Sources, so we have to download the software manually and compile it. This step, however, is not too difficult:

Prerequisites: Install

So that we can compile eAccelerator for the system, are needed for some packages that are included in "build-essential", we also need the php5-dev package. This we will install the following command:

apt-get install build-essential php5-dev

eAccelerator download and unzip:

Now we grab the latest version of eAccelerator with the manufacturer's site and save it to / usr / src. Currently, the latest version 0.9.5.3.

cd /usr/src
wget get http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.zip

The eAccelerator is now packed in our / usr / src directory. This we will now unpack.

unzip eaccelerator-0.9.5.3.zip

eAccelerator has been successfully extracted in / usr / src.

eAccelerator compile and configure:

Compile with the following commands / we install eAccelerator for our system

cd eaccelerator-0.9.5.3
phpize
./configure
make
make install

Once these steps are completed, we share with our PHP, we would like to use eAccelerator. For this we create a new ini file in our default PHP directory

vi /etc/php5/conf.d/eaccelerator.ini

The eaccelerator.ini we just created is now filled with the following standard contents:

extension="eaccelerator.so"
eaccelerator.shm_size="16"
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"

Genaure information about the settings you here is

Thus, the eAccelerator cache files can sit on our hard drive, we create the folder that we configured in the. Ini file (/ var / cache / eaccelerator) and also assign the appropriate rights.

mkdir /var/cache/eaccelerator
chmod 777 /var/cache/eaccelerator

As a last and final step we will start our Apache:

apache2ctl restart

or

/etc/init.d/apache2 restart

eAccelerator control panel to activate

Thanks to Peter for the tip and the description of the Control Panel

The file only needs control.php from the directory / usr/src/eaccelerator-0.9.5.3 be copied to the webserver directory:

cp /usr/src/eaccelerator-0.9.5.3/control.php /var/www/

Now we edit the file control.php ...

vi /var/www/control.php

... And change the login information can be accessed by those on control.php ( "admin" and substitute "eAccelerator" as appropriate)

$ user = "admin";
$ pw = "eAccelerator";

As a concluding step must be granted to the Control Panel or the necessary authorization to read data from eAccelerator and send commands. For this we edit the file eaccelerator.ini ...

vi /etc/php5/conf.d/eaccelerator.ini

... And add to this the following entry

eaccelerator.allowed_admin_path="/var/www/control.php"

Now start Apache, and even the Control Panel can be accessed via http://www.mein-server.org/control.php.

Subjects:

  1. Web Server (LAMP) installation in Debian 5 (Lenny) and Ubuntu
  2. Java Installation on Debian 5.0 (Lenny)
  3. Icinga - Open Source Monitoring - Installing on Debian 5 (Lenny) with IDOUtils and MySQL database
  4. Mac OS X 10.6 - Installing PHP under Snow Leopard
  5. VMware Server 2 installation on Debian 5 (Lenny)

iPhone 468x60

Tags:

Saturday, June 6th, 2009 Linux

10 comments about eAccelerator - PHP accelerator installed in Debian 5 (Lenny) and Ubuntu

  • Julian says:

    One of the few really useful items on Google. Thank you very much!

  • DerGrobe says:

    Binary packages for Debian Lenny is available at http://www.schnuckelig.eu/blog/debian-lenny-eaccelerator-packages-amd64-20090527 the time but only for amd64, i386 still follows.

  • Aleks says:

    Although it is not particularly difficult to install eAccelerator, but it's still a very useful and good tutorial. Thank you! :)

  • Rene says:

    Thank you for the Docu is really easy anyway but a long-config search ersparrt :-)

  • [...] Christian Scholz sending postal mail print I just came across on another weblog to an article describing the installation and use of eAccelerator [...]

  • Jörn says:

    Hello, could you still post an explanation on how I get Contropanel of eaccerlator run to? The manual on the homepage Eaccerlator not work so well. Thank you!

  • Peter says:

    Control Panel

    Merci beaucoup for the instruction!

    the thing with the control panel is really quite simple:

    # File control.php "from the source directory to directory copy htdoc
    cp / usr/local/src/eaccelerator-0.9 .* / control.php / var / www / htdocs
    # Authentication at the beginning of the script to adapt
    vim / var / www / htdocs / control.php
    # Eaccelerator Configuration in php.ini add the following entry:
    # Eaccelerator.allowed_admin_path = "/ var / www / htdocs / control.php"

    Then be able to call up the Control Panel under http://www.mein-server.org/control.php. It will be deleted and the cache can be visited, how many and which caches PHP scripts were.

    Best regards, Peter

    • Patrick says:

      Hello Peter,

      great success of the Control Panel. Will I be like this evening to try and add the item to the area!

      Thank you for your effort, thus living a blog - by the readers!
      Patrick

  • Leave a Reply

    rssfeed xing delicious
    Sysadmin's Life on Facebook
    debian debian
    iPhone 234x60
      Bloggeramt.de Blogverzeichnis - Blog Verzeichnis bloggerei.de Blog Top List - by TopBlogs.de Blog Verzeichnis blogoscoop blogtotal www.beliebtestewebseite.de technorati_fav System Administrator Blogverzeichnis RSS Directory bloglinx Listed in FeedArea.de Creative Commons License Internet & Communications