PHP tokyo_tyrant をインストールしてみる。
http://jp2.php.net/manual/ja/book.tokyo-tyrant.php
# pecl install tokyo_tyrant-0.3.0
pecl/tokyo_tyrant requires PHP (version >= 5.2.0), installed version is 5.1.6
No valid packages found
install failed
# pecl install tokyo_tyrant-beta
pecl/tokyo_tyrant requires PHP (version >= 5.2.0), installed version is 5.1.6
No valid packages found
install failed
あぁ・・・面倒だ。
php 5.3.2に上げたので続きを。
# pecl install tokyo_tyrant-0.3.0
Build process completed successfully
Installing ‘/usr/lib/php/modules/tokyo_tyrant.so’
install ok: channel://pecl.php.net/tokyo_tyrant-0.3.0
configuration option “php_ini” is not set to php.ini location
You should add “extension=tokyo_tyrant.so” to php.ini
# vim /etc/php.d/tokyotyrant.ini
extension=tokyo_tyrant.so
を書いてみた。
http://jp2.php.net/manual/ja/tokyo-tyrant.installation.php
セッションハンドらの設定は置いといて。
# /usr/local/sbin/ttservctl start
Starting the server of Tokyo Tyrant
Executing: ttserver -port 1978 -dmn -pid /var/ttserver/pid
Done
$tt = new TokyoTyrant("127.0.0.1");
$tt->put(“key”, “value”);
echo $tt->get(“key”);
valueが表示されました。
# /usr/local/sbin/ttservctl stop
Stopping the server of Tokyo Tyrant
Sending the terminal signal to the process: 15491
Done
とりあえずOK.