Install eAccelerator in Ubuntu

Source: Internet
Author: User
Today, an eAccelerator extension is installed on a Ubuntu machine. Write a small note as follows: first, you have to install the php5-dev: sudoapt-getinstallphp5-dev download eAccelerator :( specific can visit the official website, the version is different, the address is also different) wgethttp: // bart. eaccelera today installed the eAccelerator extension on a Ubuntu machine. Write a note as follows:

First, you have to install the php5-dev:

Sudo apt-get install php5-dev
Download eAccelerator: (you can visit the official website. The version varies with the address)

Wget http://bart.eaccelerator.net/source/0.9.5.3/eaccelerator-0.9.5.3.tar.bz2



Decompress eAccelerator:

Tar jxvf eaccelerator-0.9.5.3.tar.bz2
Go to the eAccelerator Directory:

Cd eaccelerator-0.9.5.3/
Run the following commands ):

Phpize
Sudo./configure -- enable-eaccelerator = shared
Sudo make
Sudo make install
After installation, the screen displays the following information:

Installing shared extensions:/usr/lib/php5/20060613 + lfs/
Then modify php. ini:

Sudo vi/etc/php5/apache2/php. ini
Add the following at the end of the document:

Zend_extension = "/usr/lib/php5/20060613 + lfs/eaccelerator. so"
Eaccelerator. shm_size = "16"
Eaccelerator. cache_dir = "/tmp/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"
Eaccelerator. allowed_admin_path = "/var/www/control. php"
Here we will explain the eaccelerator in the last line. allowed_admin_path indicates the actual path of the eAccelerator's online control file, so that you can use http: // your URL/control. php to control the eAccelerator.

Next, create a cache Directory (one command line per line ):

Sudo mkdir/tmp/eaccelerator
Sudo chmod 0777/tmp/eaccelerator
Then go to the eaccelerator-0.9.5.3 directory to copy control. php to the site directory:

Sudo cp control. php/var/www
Then modify the $ user and $ pw content in control. php:

Sudo vi/var/www/control. php
Because when you use http: // your URL/control. php for access, you need to enter the account and password. $ User is the account and $ pw is the password.

Run the following command to check the configuration of apache2:

Apache2ctl configtest
If no error occurs, restart apache:

Sudo/etc/init. d/apache2 restart
This is all done.

In phpinfo (), you can see the following:

This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
With eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
 
Related Article

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.