{"id":794,"date":"2009-05-12T19:00:50","date_gmt":"2009-05-12T10:00:50","guid":{"rendered":"http:\/\/ecpplus.net\/weblog\/?p=794"},"modified":"2022-09-29T17:53:44","modified_gmt":"2022-09-29T08:53:44","slug":"ruby%e3%81%a7tokyotyrant%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f","status":"publish","type":"post","link":"https:\/\/ecpplus.net\/weblog\/ruby%e3%81%a7tokyotyrant%e4%bd%bf%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f\/","title":{"rendered":"Ruby\u3067tokyotyrant\u4f7f\u3063\u3066\u307f\u305f"},"content":{"rendered":"<p>OSX\u3092\u4f7f\u3063\u3066\u3001ruby\u3067<a href=\"http:\/\/tokyocabinet.sourceforge.net\/\">tokyotyrant<\/a>\u4f7f\u3063\u3066\u307f\u305f\u3002<\/p>\n<h4>\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h4>\n<h5>tokyocabinet<\/h5>\n<p>\u6700\u65b0\u7248\u3092<a href=\"http:\/\/tokyocabinet.sourceforge.net\/\">\u516c\u5f0f\u30b5\u30a4\u30c8<\/a>\u304b\u3089\u843d\u3068\u3057\u3066\u304f\u308b\u3002\u73fe\u6642\u70b9\u3067\u306e\u6700\u65b0\u306f\u30011.4.20\u3060\u3063\u305f\u3002<\/p>\n<pre lang=\"bash\">% curl -O http:\/\/tokyocabinet.sourceforge.net\/tokyocabinet-1.4.20.tar.gz\n% tar xvzf tokyocabinet-1.4.20.tar.gz\n% cd tokyocabinet-1.4.20\n% .\/confiruge --prefix=\/usr\/local\n% make \n# make install<\/pre>\n<h5>tokyotyrant<\/h5>\n<p>\u540c\u69d8\u306b\u3001\u6700\u65b0\u7248\u3092\u516c\u5f0f\u30b5\u30a4\u30c8\u306etokyotyrant\u306e\u30d1\u30c3\u30b1\u30fc\u30b8\u4e00\u89a7\u304b\u3089\u843d\u3068\u3057\u3066\u304f\u308b\u3002\u73fe\u6642\u70b9\u3067\u306e\u6700\u65b0\u306f\u30011.1.26\u3060\u3063\u305f\u3002<\/p>\n<pre lang=\"bash\">% curl -O http:\/\/tokyocabinet.sourceforge.net\/tyrantpkg\/tokyotyrant-1.1.26.tar.gz\n% tar xvzf tokyotyrant-1.1.26.tar.gz\n% cd tokyotyrant-1.1.26\n% .\/confiruge --prefix=\/usr\/local\n% make \n# make install<\/pre>\n<h5>tokyocabinet Ruby\u7528API<\/h5>\n<p>\u540c\u69d8\u306b\u3001\u6700\u65b0\u7248\u3092\u516c\u5f0f\u30b5\u30a4\u30c8\u306eRubyAPI\u306e\u4e00\u89a7\u304b\u3089\u843d\u3068\u3057\u3066\u304f\u308b\u3002\u73fe\u6642\u70b9\u3067\u306e\u6700\u65b0\u306f\u30011.23\u3060\u3063\u305f\u3002<\/p>\n<pre lang=\"bash\">% curl -O http:\/\/tokyocabinet.sourceforge.net\/rubypkg\/tokyocabinet-ruby-1.23.tar.gz\n% tar xvzf tokyocabinet-ruby-1.23.tar.gz\n% cd tokyocabinet-ruby-1.23\n% ruby extconf.rb\n% make \n# make install<\/pre>\n<h5>tokyotyrant Ruby\u7528API<\/h5>\n<p>\u540c\u69d8\u306b\u3001\u6700\u65b0\u7248\u3092\u516c\u5f0f\u30b5\u30a4\u30c8\u306eRubyAPI\u306e\u4e00\u89a7\u304b\u3089\u843d\u3068\u3057\u3066\u304f\u308b\u3002\u73fe\u6642\u70b9\u3067\u306e\u6700\u65b0\u306f\u30011.5\u3060\u3063\u305f\u3002<\/p>\n<pre lang=\"bash\">% curl -O http:\/\/tokyocabinet.sourceforge.net\/tyrantrubypkg\/tokyotyrant-ruby-1.5.tar.gz\n% tar xvzf tokyotyrant-ruby-1.5.tar.gz\n% cd cd tokyotyrant-ruby-1.5\n# ruby install.rb<\/pre>\n<h4>tokyotyrant\u30b5\u30fc\u30d0\u3092\u8d77\u52d5\u3057\u3066\u307f\u308b<\/h4>\n<pre lang=\"bash\">% sudo \/usr\/local\/sbin\/ttservctl start\nStarting the server of Tokyo Tyrant\n\/usr\/local\/sbin\/ttservctl: line 49: ulimit: open files: cannot modify limit: Invalid argument\nExecuting: ttserver -port 1978 -dmn -pid \/var\/ttserver\/pid\nDone<\/pre>\n<p>\u306a\u3093\u304b\u30a8\u30e9\u30fc\u304c\u51fa\u308b\u306e\u3067\u3001\/usr\/local\/sbin\/ttservctl \u306e49\u884c\u76ee\u3092\u898b\u3066\u307f\u308b\u3002<\/p>\n<pre lang=\"bash\" line=\"48\">if [ -n \"$maxcon\" ] ; then\n   ulimit -n \"$maxcon\"\n fi<\/pre>\n<p>maxcon \u3068\u3044\u3046\u5909\u6570\u3092\u898b\u3066\u307f\u308b\u3068<\/p>\n<pre lang=\"bash\" line=\"21\">dbname=\"$basedir\/casket.tch#bnum=1000000\"\nmaxcon=\"65535\"\nretval=0<\/pre>\n<p>ulimit \u304c\u30a8\u30e9\u30fc\u3089\u3057\u3044\u304c\u3001ulimit \u304c\u3088\u304f\u5206\u304b\u3089\u306a\u3044\u3002\u9069\u5f53\u306b\u6570\u5b57\u3092 maxcon=6000 \u3068\u304b\u3057\u305f\u3089\u30a8\u30e9\u30fc\u6d88\u3048\u305f\u3051\u3069\u3044\u3044\u306e\u304b\u2026\uff1f<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001\u7121\u4e8b\u8d77\u52d5\u3002<\/p>\n<h4>\u63a5\u7d9a<\/h4>\n<p>\u30b7\u30a7\u30eb\u304b\u3089\u63a5\u7d9a\u3059\u308b\u5834\u5408\u306f\u3001<code>tcrmgr<\/code> \u3068\u3044\u3046\u30b3\u30de\u30f3\u30c9\u3092\u4f7f\u3046\u3089\u3057\u3044\u3002<\/p>\n<h5>\u5024\u306e\u8a2d\u5b9a<\/h5>\n<p><code>tcrmgr <strong>put<\/strong> {host} {key} {value}<\/code> \u3068\u3044\u3046\u66f8\u5f0f\u3067\u30bb\u30c3\u30c8\u3059\u308b\u3002name \u3068\u3044\u3046\u30ad\u30fc\u306b\u3001CHU \u3068\u3044\u308c\u308b\u306a\u3089\u3070\u3001<\/p>\n<pre lang=\"\">tcrmgr set localhost name CHU<\/pre>\n<h5>\u5024\u306e\u53d6\u5f97<\/h5>\n<p><code>tcrmgr <strong>get<\/strong> {host} {key}<\/code> \u3068\u3044\u3046\u66f8\u5f0f\u3067\u30b2\u30c3\u30c8\u3059\u308b\u3002name \u3068\u3044\u3046\u30ad\u30fc\u306e\u5024\u3092\u53d6\u5f97\u3059\u308b\u306a\u3089\u3070\u3001<\/p>\n<pre lang=\"\">tcrmgr get localhost name<\/pre>\n<p>\u3068\u308a\u3042\u3048\u305a\u3001\u8d77\u52d5\u3057\u3066\u52d5\u3044\u3066\u3044\u308b\u3088\u3046\u3060\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>OSX\u3092\u4f7f\u3063\u3066\u3001ruby\u3067tokyotyrant\u4f7f\u3063\u3066\u307f\u305f\u3002 \u30a4\u30f3\u30b9\u30c8\u30fc\u30eb tokyocabinet \u6700\u65b0\u7248\u3092\u516c\u5f0f\u30b5\u30a4\u30c8\u304b\u3089\u843d\u3068\u3057\u3066\u304f\u308b\u3002\u73fe\u6642\u70b9\u3067\u306e\u6700\u65b0\u306f\u30011.4.20\u3060\u3063\u305f\u3002 % curl -O http:\/\/toky [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":2872,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[43],"tags":[8],"class_list":["post-794","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-development","tag-ruby"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/794","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/comments?post=794"}],"version-history":[{"count":4,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/794\/revisions"}],"predecessor-version":[{"id":4362,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/posts\/794\/revisions\/4362"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media\/2872"}],"wp:attachment":[{"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/media?parent=794"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/categories?post=794"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ecpplus.net\/weblog\/wp-json\/wp\/v2\/tags?post=794"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}