One, install and configure on the VPS
The following actions are performed in SSH. Check to see if the Make module is installed, most of it is installed, no, first install make module:
The code is as follows |
Copy Code |
Yum Install make |
Enter the following command to run row by line. Download-Extract-Toggle Directory-Configure compilation installation-switch to root-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 a profile in/etc/php.d/Eaccelerator.ini:
The code is as follows |
Copy Code |
Vim/etc/php.d/eaccelerator.ini |
Edit this file, as follows, 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 that the installation is successful
After opening several PHP pages, switch to the cache directory/tmp/eaccelerator in SSH and use Dir to see if there are any cached files (clips), 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 (), and the following figure indicates that the installation configuration was successful
Two, VPS installation eaccelerator precautions
The above is the process of installation success, the middle encountered a lot of problems, I VPS is CentOS Linux,vps opened successfully after the Php5.1.6 and Mysql5.0.45, installation of easy to install customer CRM needs to be installed Zend Optimizer3.3.0, it is best to install the Eaccelerator buffer Accelerator, which can improve the efficiency of the system.
PHP5.1.6 is the default installation, the VPS prohibit make command, so the software installed on the VPS can only be installed via RPM or a compiled installation package.
Zend Optimizere is easy to install, download the TAR packets, use the tar xzvf command to extract the tar packets, and then execute the install.sh files inside, the wizard will be able to successfully install Zend Optimizer, Note that the path to PHP.ini must be written in the right order, and that the current directory command should be preceded by a "./" to indicate the current directory.
The RPM package was not found on the official website of Eaccelerator, and Google was also found here quickly. If there is a problem installing the package, you can rpmbuild the RPM source code package. After the successful installation will be in the Php/modules directory to generate the so file, while in the/etc/php.d/directory to generate Eaccelerator.ini files, PHP will automatically invoke the PHP.D directory under the INI file. Then restart Apache, found that startup failed, restart Linux or not boot, view/var/log/httpd/error_log, found the start Apache times wrong PHP Fatal error: [Zend Optimizer] Zend Optimizer 3.3.0 is incompatible with eaccelerator 0.9.5 into Unknown on line 0,google This error message, looked at several URLs, finally found the solution, the original must be the EACC Elerator configuration parameters are placed in front of the Zend optimizer parameters, delete/etc/php.d/eaccelerator.iniw files, restart Apache, normal startup, 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
also understands why you need to put the configuration parameters of the EA in front of the Zend configuration key before.