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.

This entry was posted on 火曜日, 3月 23rd, 2010 at 2:23 AM and is filed under blog. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Unityによるゲームを公開しております iOS/Android
https://itunes.apple.com/jp/app/lost-knight-3d-action/id900917032
https://play.google.com/store/apps/details?id=com.groundroad.runknight

各種開発支援・機能開発等小さいお仕事などもお請けしております。
unity開発支援, PHPシステム開発, javascript/html5 フロント開発, titanium mobileアプリ開発
お気軽にお問い合わせください
大崎・五反田近郊での対面でのお打ち合わせはいつでも可能です。