{"id":2109,"date":"2015-02-17T08:12:28","date_gmt":"2015-02-17T08:12:28","guid":{"rendered":"http:\/\/truelogic.org\/wordpress\/?p=2109"},"modified":"2015-02-17T08:12:28","modified_gmt":"2015-02-17T08:12:28","slug":"install-tokyo-tyrant-in-linux","status":"publish","type":"post","link":"https:\/\/truelogic.org\/wordpress\/2015\/02\/17\/install-tokyo-tyrant-in-linux\/","title":{"rendered":"Install Tokyo Tyrant in Linux"},"content":{"rendered":"<h4>WHAT IS TOKYO TYRANT?<\/h4>\n<p>Tokyo Cabinet (TC) is a data repository which is tailored for high speed retrieval. It is not a full fledged DBMS like Mysql or MongoDB . At its core, it is a simple key-value lookup database. Any kind of data , binary or character based, can be a key to any kind of value &#8211; again binary or character based. It supports very fast updates and retrieval.<\/p>\n<p>Tokyo Tyrant (TT) is the set of packages which allows external programs to work with TC. It provides a set of functions which allows manipulation and retrieval of data with TC. TT acts a server which interacts with TC.<\/p>\n<p>&nbsp;<\/p>\n<p>TT can be used with several popular languages. Libraries and APIs exist for Perl, Ruby, Java, PHP, Python, C# and others.<\/p>\n<h3><\/h3>\n<h3>INSTALLATION<\/h3>\n<p>This article focuses on installing TT on Linux Mint. Most of the steps should be the same in other versions of Linux, with minor differences in commands or locations of the files. TT does not work in Windows as of now.<\/p>\n<p>&nbsp;<\/p>\n<p><strong>1.Download The Files<\/strong><\/p>\n<p>Tokyo Cabinet can be downloaded from here:<a href=\"http:\/\/fallabs.com\/tokyocabinet\/tokyocabinet-1.4.48.tar.gz\" target=\"_blank\"> http:\/\/fallabs.com\/tokyocabinet\/tokyocabinet-1.4.48.tar.gz<\/a><\/p>\n<p>Tokyo Tyrant can be downloaded from here:<a href=\"http:\/\/fallabs.com\/tokyotyrant\/tokyotyrant-1.1.41.tar.gz\" target=\"_blank\"> http:\/\/fallabs.com\/tokyotyrant\/tokyotyrant-1.1.41.tar.gz<\/a><\/p>\n<p>Unarchive the two archive files into their own directories.<\/p>\n<p>TC depends on zlib and bzip2 , so you need to make sure they are already present in your system.<\/p>\n<p>To install zlib, type<\/p>\n<p><em>sudo apt-get install zlib1g-dev<\/em><\/p>\n<p>To install bzip2, type<\/p>\n<p><em>sudo apt-get install libbz2-dev<\/em><\/p>\n<p>&nbsp;<\/p>\n<p><strong>2.Compile TC<\/strong><\/p>\n<p>Change current directory to the TC directory which was created after unarchive. eg.<\/p>\n<p><em> cd tokyocabinet-1.4.48<\/em><\/p>\n<p>Run the configuration script:<\/p>\n<p><em>sudo\u00a0 .\/configure<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>If you get the error message<em> &#8220;error: C compiler cannot create executables&#8221;<\/em> it means the gcc compiler is not installed in the system. You will have to install gcc first. . Most Linux Mint systems do not have it as part of the default installation since not everyone wants to do development. To install gcc type:<\/p>\n<p><em>sudo apt-get install gcc<\/em><\/p>\n<p>In case your gcc is up to date, then you need to update the build-essential package:<\/p>\n<p><em>sudo apt-get install gcc build-essential<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>At this stage <em>sudo .\/configure<\/em> should run fine.<\/p>\n<p>Run the make file<\/p>\n<p><em>sudo make<\/em><\/p>\n<p>Run its self-diagnostics<\/p>\n<p><em>make check<\/em><\/p>\n<p>Run the final install<\/p>\n<p><em>sudo make install<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p><strong>3.Compile TT<\/strong><\/p>\n<p>Change current directory to the TT directory which was created after unarchive. eg.<\/p>\n<p><em> cd tokyotyrant-1.1.41<\/em><\/p>\n<p>Run the configuration script:<\/p>\n<p><em>sudo\u00a0 .\/configure<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>If you get the error message<em> &#8220;error: C compiler cannot create executables&#8221;<\/em> it means the gcc compiler is not installed in the system. You will have to install gcc first. . Most Linux Mint systems do not have it as part of the default installation since not everyone wants to do development. To install gcc type:<\/p>\n<p><em>sudo apt-get install gcc<\/em><\/p>\n<p>In case your gcc is up to date, then you need to update the build-essential package:<\/p>\n<p><em>sudo apt-get install gcc build-essential<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>At this stage <em>sudo .\/configure<\/em> should run fine.<\/p>\n<p>Run the make file<\/p>\n<p><em>sudo make<\/em><\/p>\n<p>Run install<\/p>\n<p><em>sudo make install<\/em><\/p>\n<p>&nbsp;<\/p>\n<h3>TEST THE INSTALLATION<\/h3>\n<p>Open a new terminal window and type<\/p>\n<p><em>ttserver<\/em><\/p>\n<p>This will start the tokyotyrant server<\/p>\n<p>Open another terminal window and go to the tokyotyrant directory eg.<\/p>\n<p><em>cd tokyotyrant-1.1.41<\/em><\/p>\n<p>Type<\/p>\n<p><em>make check<\/em><\/p>\n<p>This will run some diagnostics. Once checking has completed you can stop the ttserver by pressing Ctrl C<\/p>\n<p>&nbsp;<\/p>\n<h3>FINAL WORD<\/h3>\n<p>To get more information and help for TokyoTyrant you can go to <a href=\"http:\/\/fallabs.com\/tokyotyrant\/spex.html#serverprog\" target=\"_blank\">http:\/\/fallabs.com\/tokyotyrant\/spex.html#serverprog<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"mh-excerpt\"><p>WHAT IS TOKYO TYRANT? Tokyo Cabinet (TC) is a data repository which is tailored for high speed retrieval. It is not a full fledged DBMS <a class=\"mh-excerpt-more\" href=\"https:\/\/truelogic.org\/wordpress\/2015\/02\/17\/install-tokyo-tyrant-in-linux\/\" title=\"Install Tokyo Tyrant in Linux\">[&#8230;]<\/a><\/p>\n<\/div>","protected":false},"author":1,"featured_media":2116,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[298,11],"tags":[],"class_list":["post-2109","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-tutorials"],"_links":{"self":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/2109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/comments?post=2109"}],"version-history":[{"count":6,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/2109\/revisions"}],"predecessor-version":[{"id":2115,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/posts\/2109\/revisions\/2115"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media\/2116"}],"wp:attachment":[{"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/media?parent=2109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/categories?post=2109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/truelogic.org\/wordpress\/wp-json\/wp\/v2\/tags?post=2109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}