和6年能登半島地震により亡くなられた方々のご冥福をお祈りするとともに、被害に遭われた皆さまに対し、心よりお見舞い申し上げます。一日も早く被災地の安全が確保され、復旧が進む事を心よりお祈り申し上げます。

eAccelerator入れてみる

キャッシュ拡張モジュール(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 で確認

コメント