Archive for 3月, 2010

 

Tokyotyrant インデックス設定

3月 29th, 2010

phpからsetindexしたらメモリーエラーです。 TokyoTyrant::RDBIT_LEXICAL レキシカル文字列 TokyoTyrant::RDBIT_DECIMAL 十進文字列 TokyoTyrant::RDBIT_TOKEN トークン転置インデックス (Tokyo Tyrant >= 1.1.29) TokyoTyrant::RDBIT_QGRAM QGRAM 転置インデックス (Tokyo Tyrant >= 1.1.29) TokyoTyrant::RDBIT_OPT 最適化 TokyoTyrant::RDBIT_VOID void TokyoTyrant::RDBIT_KEEP 既存のインデックスを保持する 保留。

Read full article | コメントは受け付けていません。

TokyoTyrantTable テーブル操作

3月 28th, 2010

phpからテーブル操作を $data=array(‘key’=>’ほほほ’,’age’=>’90’); $tt = new TokyoTyrantTable($this->host,$this->port); $tt->put(null,$data); $query = self::$tt->getQuery(); $query->addCond(‘key’, TokyoTyrant::RDBQC_STREQ, ’ほほほ’); $results=$query->search(); この使い方だとindex設定しないと駄目そうですね。

Read full article | コメントは受け付けていません。

Tokyotyrant 実行スクリプト

3月 28th, 2010

http://1978th.net/tech/promenade.cgi?id=58 http://linux.papa.to/?date=20100315 http://alpha.mixi.co.jp/blog/?p=290 http://asakura.g.hatena.ne.jp/asakura-t/20100219/tokyo_tyrant # cp /usr/local/sbin/ttservctl /etc/init.d/tokyotyrant/keywords # vim /etc/init.d/tokyotyrant/keywords 上のほうを変更してみる。 # configuration variables database = “keywords” prog=”ttservctl” cmd=”ttserver” basedir=”/var/ttserver/$database” port=”19781″ pidfile=”$basedir/pid” #logfile=”$basedir/log” #ulogdir=”$basedir/ulog” ulimsiz=”64m” #sid=1 #mhost=”remotehost1″ #mport=”1978″ #rtsfile=”$basedir/rts” #dbname=”$basedir/$database.tch#bnum=1000000″ dbname=”$basedir/$database.tct#opts=l#apow=8#dfunit=2″ retval=0 実行してみる。 # chmod a+x /etc/init.d/tokyotyrant/keywords # /etc/init.d/tokyotyrant/keywords start Starting the server of Tokyo Tyrant Executing: ttserver -port 19781 -dmn -pid /var/ttserver/keywords/pid -ulim […]

Read full article | コメントは受け付けていません。

さくらの専用サーバー : iptables 設定。

3月 28th, 2010

まずは、設定をミスっても(無料)再起動で対応可能にしておく。 # /sbin/chkconfig iptables –list iptables 0:off 1:off 2:on 3:on 4:on 5:on 6:off # /sbin/chkconfig iptables off # /sbin/chkconfig iptables –list iptables 0:off 1:off 2:off 3:off 4:off 5:off 6:off 接続不能になったら再起動してもらいましょう。 設定完了確認後 on にしておきましょう。 または、起動後は自分でiptablesを実行することをお忘れなく。 まずは、つながらなくなると困るので ポリシー設定 INPUT ACCEPT /sbin/iptables -P INPUT ACCEPT /sbin/iptables -P OUTPUT ACCEPT /sbin/iptables -P FORWARD DROP 確認 /sbin/iptables -L ルールを消す。 /sbin/iptables […]

Read full article | コメントは受け付けていません。

PHP tokyo_tyrant をインストールしてみる。

3月 23rd, 2010

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 […]

Read full article | コメントは受け付けていません。

update PHP 5.3.2 for Centos 5.2

3月 23rd, 2010

php 5.1.6なので、5.2.xにしたかったのですが、 5.3でも良いので更新してみました。 こちらを利用してみます。 http://blog.famillecollet.com/pages/Config-en 使い方。適当なので、自己責任でお願いします。 phpとmysqlがupdateされますので、mysqlを利用している方は良く確認・テスト。バックアップを。 * phpのみはupdate出来なかった。 Enterprise Linux 5 (with EPEL) # wget http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-2.noarch.rpm # wget http://rpms.famillecollet.com/enterprise/remi-release-5.rpm # rpm -Uvh remi-release-5*.rpm epel-release-5*.rpm 警告: remi-release-5.rpm: ヘッダ V4 DSA signature: NOKEY, key ID 00f97f56 準備中… ########################################### [100%] パッケージ epel-release-5-3.noarch は既にインストールされています。 # rpm -Uvh remi-release-5*.rpm 警告: remi-release-5.rpm: ヘッダ V4 DSA signature: NOKEY, key ID 00f97f56 […]

Read full article | コメントは受け付けていません。

Tokyo Tyrantをインストールする。

3月 22nd, 2010

# yum install gcc make zlib-devel bzip2-devel # wget http://1978th.net/tokyotyrant/tokyotyrant-1.1.40.tar.gz # cd tokyotyrant-1.1.40 # ./configure # make # make install #================================================================ # Thanks for using Tokyo Tyrant. #================================================================ 入りました。 確認 # /usr/local/sbin/ttservctl start Starting the server of Tokyo Tyrant Executing: ttserver -port 1978 -dmn -pid /var/ttserver/pid Done こんな感じで start しました。 動かしつつ [root@localhost tokyotyrant-1.1.40]# make check […]

Read full article | コメントは受け付けていません。

Tokyo Cabinet をインストールしてみる。

3月 22nd, 2010

# yum install tokyocabinet* Installing: tokyocabinet               i386         1.4.9-1.el5         epel         458 k tokyocabinet-devel         i386         1.4.9-1.el5         epel         556 k だけど。tokyotyrantが駄目だった・・・なので入れなおし。 # wget […]

Read full article | コメントは受け付けていません。

VPSを検討してみる。やっぱり「さくら」かな・・・

3月 21st, 2010

↑レンタルサーバーならさくらでどうぞ。 今さくらの専用と共用を使っているので VPSで良いのないかなぁと思い探してみたものの・・・ない。 自分の欲しいものは、スペック、特にメモリーが良い感じのものはないかなぁとおもったのですが特にないです。 VPSの良いと思ったところ * 安くroot権限を利用できる。 用途次第では十分検討対象となるでしょう! まぁ使ってみないとわからないので、あまり評判良くないですが^-^;お名前のVPSを試しに借りてみようか悩み中。 2010/3/31まで、初期費用無料、3ヶ月無料(最低利用期間は3ヶ月なので、最低2980×3は有料です。で6ヶ月使ってみる分にはまぁ良いのではないでしょうか?) お名前.comのVPS ipを210円で追加できるのは良いと思います。 === ^-^;excelなどにこぴぺしてみてください。=== サービス | URL | 初期 | 月額 | CPU | HDD | メモリー | OS | 帯域 | | さくら専用エントリー | | 0 | 7800 | “celeron or atom 参考 Intel(R) Atom(TM) CPU 330 @ 1.60GHz” | 160 | 1 | […]

Read full article | コメントは受け付けていません。

Webmaster Center – Bing

3月 21st, 2010

Bing Webmaster Centerを利用してみる。 ログインすると web addressなどの入力フォームが表示されるので auction.as4.orgと登録すると認証ファイル設置へ進む。 File name: LiveSearchSiteAuth.xml File content: <?xml version=”1.0″?> <users> <user>ここは認証用の文字列</user> </users> これを保存。 メタに各方法もある。 これでOK. サイト情報を見ると Last crawled , Domain score , Indexed Pages, Blocked , top 5pages などの表示がある。 sitemapsもありサイトマップを登録できる。 今はindex 2020なのでサイトマップを登録して様子を見てみる。 Webmaster Center – Bing.

Read full article | コメントは受け付けていません。