{"id":2216,"date":"2012-11-04T18:11:59","date_gmt":"2012-11-04T09:11:59","guid":{"rendered":"http:\/\/blog.isnext.net\/issy\/?p=2216"},"modified":"2012-11-04T18:11:59","modified_gmt":"2012-11-04T09:11:59","slug":"centos6%e7%b3%bb%e3%81%aemysql%e3%81%a7%e6%97%a5%e6%9c%ac%e8%aa%9e%e5%85%a8%e6%96%87%e6%a4%9c%e7%b4%a2","status":"publish","type":"post","link":"https:\/\/blog.isnext.net\/issy\/archives\/2216","title":{"rendered":"CentOS6\u7cfb\u306eMySQL\u3067\u65e5\u672c\u8a9e\u5168\u6587\u691c\u7d22"},"content":{"rendered":"<p><strong>\u25a0CentOS6\u7cfb\u306eMySQL\u3067\u65e5\u672c\u8a9e\u5168\u6587\u691c\u7d22<\/strong><br \/>\n CentOS6\u7cfb\u306eMySQL\u306f5.1\u306b\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u65e5\u672c\u8a9e\u5168\u6587\u691c\u7d22\u7528\u9014\u30675.0\u7cfb\u3067\u4f7f\u3063\u3066\u304d\u305fTritonn\u304c\u4f7f\u3048\u306a\u3044\u3002\u305d\u306e\u305f\u3081\u65b0\u305f\u306bftppc mecab\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5c0e\u5165\u3057\u4ee3\u66ff\u3068\u3059\u308b\u3002\u53c2\u8003\u3057\u305f\u8a18\u4e8b\u306f\u4ee5\u4e0b\u3002<\/p>\n<p><a href=\"http:\/\/www.genteel.org\/?p=132\">http:\/\/www.genteel.org\/?p=132<\/a><br \/>\n<a href=\"http:\/\/mironal-memo.blogspot.jp\/2012\/07\/vpscentos-6mecab.html\">http:\/\/mironal-memo.blogspot.jp\/2012\/07\/vpscentos-6mecab.html<\/a><\/p>\n<p><strong>\u25a0\u4ee5\u4e0b\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u624b<\/strong>\u9806<br \/>\ngcc\u3068gcc-c++,mysql-devel\u5fc5\u9808<\/p>\n<p>[code]# yum install gcc gcc-c++ mysql-devel libicu libicu-devel<br \/>\n# wget http:\/\/mecab.googlecode.com\/files\/mecab-0.994.tar.gz<br \/>\n# wget http:\/\/mecab.googlecode.com\/files\/mecab-ipadic-2.7.0-20070801.tar.gz<br \/>\n# tar zxvf mecab-0.994.tar.gz<br \/>\n# cd mecab-0.994<br \/>\n# .\/configure<br \/>\n# make &#038;&#038; make install<br \/>\n# ..\/<br \/>\n# tar zxvf mecab-ipadic-2.7.0-20070801.tar.gz<br \/>\n# cd mecab-ipadic-2.7.0-20070801<br \/>\n# .\/configure &#8211;with-cherset=utf-8<br \/>\n# make &#038;&#038; make install<br \/>\n# ..\/<br \/>\n# wget http:\/\/jaist.dl.sourceforge.net\/project\/mysqlftppc\/mysqlftppc\/1.6.1\/mysqlftppc-mecab-1.6.1.tar.gz<br \/>\n# cd mysqlftppc-mecab-1.6.1<br \/>\n# .\/configure &#038;&#038; make &#038;&#038; make install[\/code]<\/p>\n<p>MySQL\u3078\u306e\u30d7\u30e9\u30b0\u30a4\u30f3\u5c0e\u5165<\/p>\n<p>[code]mysql> INSTALL PLUGIN mecab SONAME &#8216;libftmecab.so.0.0.0&#8217;;<br \/>\nmysql> show plugin;<br \/>\nmysql> show status like &#8220;mecab_info&#8221;;[\/code]<\/p>\n<p>\u5c0e\u5165\u3067\u304d\u305f\u304b\u691c\u7d22\u3067\u78ba\u8a8d<\/p>\n<p>[code]mysql> use test<br \/>\nmysql> CREATE TABLE me (c TEXT, FULLTEXT(c) WITH PARSER mecab);<br \/>\nmysql> show create table me\\G<br \/>\nmysql> INSERT INTO me VALUES(&#8220;\u4eca\u65e5\u306e\u5929\u6c17\u306f\u6674\u308c\u3067\u3059\u3002&#8221;);<br \/>\nmysql> SELECT * FROM me WHERE MATCH(c) AGAINST(&#8216;+&#8221;\u4eca\u65e5\u306e\u5929\u6c17&#8221;&#8216; IN BOOLEAN MODE);<br \/>\nmysql> explain SELECT * FROM me WHERE MATCH(c) AGAINST(&#8216;+&#8221;\u4eca\u65e5\u306e\u5929\u6c17&#8221;&#8216; IN BOOLEAN MODE);[\/code]<\/p>\n<p>Tritonn\u3067\u4f5c\u6210\u3057\u305findex\u3092\u30c0\u30f3\u30d7\u5f8c\u7de8\u96c6\u3057\u3066\u53d6\u308a\u8fbc\u3080\u6642\u306e\u4fee\u6b63\u65b9\u6cd5<\/p>\n<p>[code]\u5909\u66f4\u524d<br \/>\nUSING NGRAM, NORMALIZE, 512 (`body`)<\/p>\n<p>\u5909\u66f4\u5f8c<br \/>\n(`body`)\u3000\/*!50100 WITH PARSER `mecab` *\/[\/code]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u25a0CentOS6\u7cfb\u306eMySQL\u3067\u65e5\u672c\u8a9e\u5168\u6587\u691c\u7d22 CentOS6\u7cfb\u306eMySQL\u306f5.1\u306b\u306a\u3063\u3066\u3044\u308b\u305f\u3081\u3001\u65e5\u672c\u8a9e\u5168\u6587\u691c\u7d22\u7528\u9014\u30675.0\u7cfb\u3067\u4f7f\u3063\u3066\u304d\u305fTritonn\u304c\u4f7f\u3048\u306a\u3044\u3002\u305d\u306e\u305f\u3081\u65b0\u305f\u306bftppc mecab\u30d7\u30e9\u30b0\u30a4\u30f3\u3092\u5c0e\u5165 &hellip; <a href=\"https:\/\/blog.isnext.net\/issy\/archives\/2216\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;CentOS6\u7cfb\u306eMySQL\u3067\u65e5\u672c\u8a9e\u5168\u6587\u691c\u7d22&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[20,24,23],"class_list":["post-2216","post","type-post","status-publish","format-standard","hentry","category-linux","tag-centos","tag-mysql","tag-tritonn"],"_links":{"self":[{"href":"https:\/\/blog.isnext.net\/issy\/wp-json\/wp\/v2\/posts\/2216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.isnext.net\/issy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.isnext.net\/issy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.isnext.net\/issy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.isnext.net\/issy\/wp-json\/wp\/v2\/comments?post=2216"}],"version-history":[{"count":2,"href":"https:\/\/blog.isnext.net\/issy\/wp-json\/wp\/v2\/posts\/2216\/revisions"}],"predecessor-version":[{"id":2218,"href":"https:\/\/blog.isnext.net\/issy\/wp-json\/wp\/v2\/posts\/2216\/revisions\/2218"}],"wp:attachment":[{"href":"https:\/\/blog.isnext.net\/issy\/wp-json\/wp\/v2\/media?parent=2216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.isnext.net\/issy\/wp-json\/wp\/v2\/categories?post=2216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.isnext.net\/issy\/wp-json\/wp\/v2\/tags?post=2216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}