commit 69b9918 code中文原文

Installing Zend Opitimizer and eAccelerator on DirectAdmin

Author
Yujia Lin
Date
Reading time
1 min read

Translated from Chinese by Claude. Read the original

Today I spent some time messing with my VPS and installed Zend Opitimizer and eAccelerator under DirectAdmin. Here’s the tutorial I wrote.

  1. First, install Zend
1
2
3
4
5
6
7
8
9
10
11
12
13
cd /usr/local/src

mkdir zend

cd zend

wget http://downloads.zend.com/optimizer/3.3.3/ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz

tar -xzvf ZendOptimizer-3.3.3-linux-glibc23-i386.tar.gz

cd ZendOptimizer-3.3.3-linux-glibc23-i386

./install.sh

Just keep hitting Enter~ no need to choose anything. Under /usr/local/lib, php.ini gets rewritten and saved, and a php.ini-zend_optimizer.bak file is saved as well

  1. Next, install eAccelerator
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
yum install autoconf

yum install automake

cd /usr/local/src

mkdir eAccelerator

cd eAccelerator

wget http://bart.eaccelerator.net/source/0.9.6/eaccelerator-0.9.6.tar.bz2

tar -xvjf eaccelerator-0.9.6.tar.bz2

cd eaccelerator-0.9.6

export PHP_PREFIX="/data/webserver/php"

$PHP_PREFIX/bin/phpize

./configure --enable-eaccelerator=shared --with-php-config=$PHP_PREFIX/bin/php-config

make & make install

cd /tmp

mkdir eaccelerator

chmod 0777 eaccelerator

Edit php.ini

1
cd /usr/local/lib vi php.ini

Add this above [Zend]

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[eaccelerator]
zend_extension=”/usr/local/lib/php/extensions/no-debug-non-zts-20060613/eaccelerator.so”
eaccelerator.shm_size=”32″
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″

Restart Apache

1
service httpd restart

Finally

1
php -v

Check the final result

1
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies with eAccelerator v0.9.6, Copyright (c) 2004-2010 eAccelerator, by eAccelera tor with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technol ogies with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

As long as you see the output above, everything’s OK!

Esc

Keyboard shortcuts

Ctrl K /
Search and commands
j k
Next or previous post in a list
Enter
Open the selected post
h l
Older or newer post (on a post)
g h
Go to the log
g a
Go to the archive
g t
Go to tags
g s
Go to stats
t
Switch light or dark theme
r
Random post
?
Show this help