How to install eAccelerator

eAccelerator Installation:


  1. If using PHP v5+, download the lastest compatible version and extract. Remember v0.9.5.3 is the last version that supports user objects, later versions only support opcode caching.
    # cd /usr/local/src && wget && tar -xjf eaccelerator- && cd eaccelerator-
  2. Note the path returned for the following command:
    # whereis php-config
  3. Use the output from #2 to modify the –with-php-config flag in the following compile command:
    # phpize && ./configure --with-eaccelerator-shared-memory --with-php-config=/usr/bin/php-config && make && make install

    The result should be similar to:

    Installing shared extensions: /usr/lib/php/modules/
  4. You can also use the eaccelerator.ini file we prepared for you:
    # cp /var/www/vhosts/ /etc/php.d/
  5. Restart apache when ready:
    # /etc/init.d/httpd restart
  6. You’re done! eAccelerator should now be available. If the following command returns anything, you’re all set:
    # php -r 'phpinfo();' | grep 'eaccelerator'