キャッシュ拡張モジュール(eAccelerator)
PHPの動作をスピードアップできるらしい・・・
▼PHPのバージョン確認しておく
# php -v
PHP 5.2.9 with Suhosin-Patch 0.9.7 (cli) (built: May 20 2009 09:30:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
———————————————————-
▼portsからインストール(^^ゞ
# cd /usr/ports/www/eaccelerator/
# make install clean
Libraries have been installed in:
/usr/ports/www/eaccelerator/work/eaccelerator-0.9.5.3/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR’
flag during linking and do at least one of the following:
– add LIBDIR to the `LD_LIBRARY_PATH’ environment variable
during execution
– add LIBDIR to the `LD_RUN_PATH’ environment variable
during linking
– use the `-Wl,–rpath -Wl,LIBDIR’ linker flag
—省略—
You have installed the eaccelerator package.
Edit /usr/local/etc/php.ini and add:
zend_extension=”/usr/local/lib/php/20060613/eaccelerator.so”
Then create the cache directory:
mkdir /tmp/eaccelerator
chown www /tmp/eaccelerator
chmod 0700 /tmp/eaccelerator
**********************************************
===> Registering installation for eaccelerator-0.9.5.3
===> Cleaning for eaccelerator-0.9.5.3
▼php.ini 編集
eAccelerator project のsettingsを参考に・・。
▼apache再起動
# /usr/local/etc/rc.d/apache22 restart
Performing sanity check on apache22 configuration:
Syntax OK
Stopping apache22.
Waiting for PIDS: 94490.
Performing sanity check on apache22 configuration:
Syntax OK
Starting apache22.
▼PHPのバージョン確認
# php -v
PHP 5.2.9 with Suhosin-Patch 0.9.7 (cli) (built: May 20 2009 09:30:05)
Copyright (c) 1997-2009 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2009 Zend Technologies
with eAccelerator v0.9.5.3, Copyright (c) 2004-2006 eAccelerator, by eAccelerator
▼phpinfo で確認
コメント