How to install eAccelerator on VPS in LINUX

Source: Internet
Author: User

EAccelerator acceleration is only one type of acceleration. eAccelerator is an open-source php accelerator that optimizes and dynamically caches content, improving the cache performance of php scripts, linux is also a commonly used software. In windows, We have fastcgi with iis for processing. This article does not introduce windows, which mainly introduces how to configure and install eAccelerator in linux.

1. installation and configuration on VPS

Perform the following operations in ssh. Check whether the make module has been installed. If not, install the make module first:

The Code is as follows: Copy code

Yum install make

Run the following command line by line. Download-unzip-switch directory-configure compilation and installation-switch to root directory-delete-create cache directory-Modify cache directory permissions.

The Code is as follows: Copy code

Wget http://www.hwzj.org/soft/Linux/eaccelerator-0.9.6.1.zip

Tar xjf eaccelerator-0.9.6.1.zip

Cd eaccelerator-0.9.6.1

/Usr/bin/phpize

./Configure-enable-eaccelerator = shared-with-php-config =/usr/bin/php-config

Make

Make install

Mkdir/tmp/eaccelerator

Chmod 777/tmp/eaccelerator

Create the configuration file eaccelerator. ini in/etc/php. d:

The Code is as follows: Copy code

Vim/etc/php. d/eaccelerator. ini

Edit the file with the following content: OPENVZ and XEN are different:

The Code is as follows: Copy code

OPENVZ:

Extension = "eaccelerator. so"

Eaccelerator. shm_size = "0 ″

Eaccelerator. cache_dir = "/tmp/eaccelerator"

Eaccelerator. enable = "1 ″

Eaccelerator. optimizer = "1 ″

Eaccelerator. check_mtime = "1 ″

Eaccelerator. debug = "0 ″

Eaccelerator. log_file = "/var/log/eaccelerator_log"

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. keys = "disk_only"

Eaccelerator. sessions = "disk_only"

Eaccelerator. content = "disk_only"

Extension = "eaccelerator. so"

Eaccelerator. shm_size = "64 ″

Eaccelerator. cache_dir = "/tmp/eaccelerator"

Eaccelerator. enable = "1 ″

Eaccelerator. optimizer = "1 ″

Eaccelerator. check_mtime = "1 ″

Eaccelerator. debug = "0 ″

Eaccelerator. log_file = "/var/log/eaccelerator_log"

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. keys = "shm_and_disk"

Eaccelerator. sessions = "shm_and_disk"

Eaccelerator. content = "shm_and_disk"

Restart apache or lighttpd

Service httpd restart

Service lighttpd restart

3. verify whether the installation is successful

Open several php pages, switch to the cache directory/tmp/eaccelerator in ssh, and use dir to check whether there are cached files (folders ), 0 1 2 3 4 5 6 7 8 9 a B c d e f

The Code is as follows: Copy code

Cd/tmp/eaccelerator

Dir

View phpinfo (). If so, the installation and configuration are successful.


Ii. Considerations for installing eaccelerator in vps

The above is a successful installation process, and many problems have been encountered in the middle. My vps is centos linux. After vps is activated successfully, it comes with Php5.1.6 and Mysql5.0.45. To install Yike CRM, you need to install Zend Optimizer3.3.0, it is best to install the eaccelerator cache accelerator to improve the system running efficiency.

PHP5.1.6 is installed by default, and the make command is forbidden on vps. Therefore, software installation on vps can only be installed through rpm or the compiled installation package.

Zend Optimizere is easy to install. Download the tar package, use the tar xzvf command to decompress the tar package, and then execute install. sh file. You can install Zend Optimizer according to the wizard. Pay attention to php. the ini path must be correct. When executing the current directory command, add ". /", indicating the current directory.

The rpm package is not found on the official website of eaccelerator, and google will soon find it here. If the installation package is incorrect, you can use the source code package of rpmbuild rpm. After the installation is successful, the so file is generated in the php/modules directory, and in the/etc/php. d/directory to generate eaccelerator. INI file. php will automatically call php when it is started. d directory. Restart apache and check whether the startup fails. Check/var/log/httpd/error_log and find that the PHP Fatal error is returned when apache is started: [Zend Optimizer] Zend Optimizer 3.3.0 is incompatible with eAccelerator 0.9.5 in Unknown on line 0. google this error message, view several URLs, and finally find a solution, in the past, we had to put the eaccelerator configuration parameters before the Zend Optimizer parameter and delete/etc/php. d/eaccelerator. iniw file, restart apache, start properly, view phpinfo, and finally see the familiar
With eAccelerator v0.9.5.2, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
With Zend Optimizer v3.3.0, Copyright (c) 1998-2007, by Zend Technologies
At the same time, it also understands why the ea configuration parameters should be placed before the zend configuration item.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.