eAccelerator - PHP accelerator installation 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 at each request, almost entirely. The already pre-compiled code is stored in shared memory and then called directly. In addition, the running time is optimized to accelerate the implementation of the PHP code.

Personal experiences with eAccelerator:

Since we hosted a while ago a little busier side and we had quite a performance problem, a friend of mine gave me the tip to try eAccelerator administrator. At first I was skeptical and was quoted to me the exact loading of the page to search for the installation of eAccelerator have a comparison. The performance increase was in my case, after installing all 89.5%.

For eAccelerator is unfortunately no official packages under the Sources, so we have to download the software to compile by hand. This step, however, is not too difficult:

Prerequisites: Install

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

apt-get install build-essential php5-dev bzip2

eAccelerator download and unzip:

We now get 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 http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2

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

tar -xjvf eaccelerator-0.9.6.tar.bz2

eAccelerator and was successfully extracted in / usr / src.

eAccelerator configure and compile:

With the following commands compile / install eAccelerator for our system, we

cd eaccelerator-0.9.6
phpize
./configure
make
make install

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

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

The newly created eaccelerator.ini fill us now with the following standard contents:

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

Information about the settings you will Genaure Here

The value "eaccelerator.shm_size defines the maximum amount of memory, which may take eAccelerator and should therefore be carefully adapted.

Thus, the eAccelerator Cache Files may place on our hard drive, we create the folder that we configured in the. Ini file (/ var / cache / eaccelerator) and also awarded the rights to.

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

As a last and final step, we now 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 must control.php only from the directory / usr/src/eaccelerator-0.9.6 be copied to the webserver directory:

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

Now we edit the file control.php ...

vi /var/www/control.php

... And change the login information that is accessible to those on control.php ("admin" and "eAccelerator" according to replace)

$ User = "admin";
$ Pw = "eAccelerator";

As a concluding step is the control panel nor the necessary permission will be granted in order to read data from eAccelerator and to 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 even restart the Apache and the Control Panel can about http://www.mein-server.org/control.php be called.

And this is the eAccelerator control panel then:

Similar items:

  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. VMware Server 2 installation on Debian 5 (Lenny)
  5. VLC 1.0.0 installation on Ubuntu Jaunty

Tags: , , , , , , , , , , ,

Saturday, June 6th, 2009 Linux

18 Comments on eAccelerator - PHP accelerator installation in Debian 5 (Lenny) and Ubuntu

  • Julian says:

    One of the few really helpful article on Google. Thank you!

  • DerGrobe says:

    Packages for Debian Lenny is finished it under http://www.schnuckelig.eu/blog/debian-lenny-eaccelerator-packages-amd64-20090527 the time but only for amd64, i386 will follow.

  • Aleks says:

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

  • Rene says:

    Many thanks for the Docu, eh but really just one long ersparrt config search :-)

  • [...] Christian Scholz mail Send mail Print I'm just on another weblog came across an article describing the installation and use of eAccelerator [...]

  • Jörn says:

    Hi, could you even post a guide as I Contropanel of eaccerlator run to get? The instructions on the homepage Eaccerlator does not work so well. Thank you!

  • Peter says:

    Control Panel

    Merci beaucoup for the instruction!

    the thing with the Control Panel is very 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 can the Control Panel under http://www.mein-server.org/control.php call. It can be deleted, and the cache will be visited, how many and which PHP scripts are cached.

    Best regards, Peter

    • Patrick says:

      Hi Peter,

      great thing with the Control Panel. I will try it tonight and add the item to the area!

      Thank you for your trouble, by living a Blog - through the readers!
      Patrick

  • Lars says:

    Hi, there are now already in version 0.9.6 eaccelerator ...

  • Veolore says:

    I have a VDS on the ispCP running and have just installed the new version and it came with me a 500 error. Why is that?
    Greetings
    Veolore

    • Patrick says:

      Hi Veolore,

      Unfortunately I know too little ispCP than that I would do any guesswork. Did the compilation process successfully, and is the cache directory writable too?

      Greeting
      Patrick

  • Killer95 says:

    About what program I need to enter the commands?

    I have already tried with cmd but I understand everything as it only works in writing, unfortunately, not yet but in practice where I enter it?

    MfG: Killer95

    • Patrick says:

      Hi Killer95,

      You are already aware of the Guide to Linux specifically for Debian / Ubuntu is based, not on Windows?

      greeting
      Patrick

  • Killer95 says:

    ok thanks for the message but how do I install it on windows since then but I have to execute those commands

  • PHP Coder says:

    Very good tutorial, we have previously used the Zend Encoder, which indeed brings about 20% more performance than eA, but does the license price with us recently, a role. Therefore we have decided to eA and are very happy with it.

    The guide was very helpful and the result has borne fruit very well. ;)

  • Leave a Reply

    rssfeed xing delicious
    Sysadmin's Life on Facebook
    steve jobs steve jobs
      Bloggeramt.de Blog directory - blog directory bloggerei.de blogoscoop blogtotal www.beliebtestewebseite.de technorati_fav Creative Commons License Internet & Communications