Tokyo tyrant (ttserver) series (1)-introduction and Installation

Source: Internet
Author: User
Tokyo cabinet is a dBm database developed by Japanese Mikio hirabayashi. It reads and writes 1 million data records in hash mode in 0.643 seconds and reads 1 million data records in 0.773 seconds, it is several times that of DBM such as Berkeley dB.
Tokyo tyrant is a network interface of the Tokyo cabinet database developed by the same author. It is compatible with memcached and can exchange data over HTTP.

Tokyo tyrant and Tokyo cabinet constitute a distributed persistent storage system that supports high concurrency. For any original memcached client, you can regard Tokyo tyrant as a memcached. However, its data can be stored permanently.


This document describes the installation process on Linux:

1) install Tokyo Cabinet
Before installing Tokyo tyrant, you must first install Tokyo cabinet.
The installation process is very simple. The standard process is as follows:
Gunzip tokyocabinet-1.4.45.tar.gztar xvf tokyocabinet-1.4.45.tar CD tokyocabinet-1.4.45/./configurationmakemake install
Note that some dependency packages may be missing during configuration and need to be installed on your own.
2) install Tokyo tyrant
After Tokyo cabinet is installed, continue to install Tokyo tyrant. The installation process is as simple as the standard process:
Tar xvf tokyocabinet-1.4.45.tar CD tokyocabinet-1.4.45/./configurationmakemake install
3) Start
The easiest way to start TT is to directly enter the command ttserver
By default, port 1978 is used to listen to all addresses.
You can also specify the port and process file: /home/openpf/APP/tokyotyrant-1.1.41/bin/ttserver-port 9032-PID/home/openpf/APP/tokyotyrant-1.1.41/data/tt_account2/tt_9032.pid/home/openpf/APP/tokyotyrant-1.1.41/ data/tt_account2/tt_account2.tch
To start tyrant in Tokyo, in addition to ttserver, another method is to use the tyrant script in Tokyo. The default address of the Tokyo tyrant script is/usr/local/sbin/ttservctl. It provides convenient and practical commands such as start/stop/restart/hup, and finally calls ttserver.
Now, the TT Server installation is complete and can be used.
4) Verification
To verify whether the installed TT can be used, we can do some simple verification.
The installation package of Tokyo tyrant comes with a detection tool, which is used to go to the directory decompressed by Tokyo tyrant, run make check to see that there are multiple test methods, such as writing test/reading test/removing test/random concatenating test/miscellaneous test/wicked writing test/typical access test/threading test, were executed, and print the test results.
5) test Telnet 127.0.0.1 9032. If the connection succeeds, you can see the connectivity, type stats, and press enter to see some status information similar to the following.

Note: In a 32-bit operating system, the size of a single database file in Tokyo cabinet cannot exceed 2 GB, but not in a 64-bit operating system. Therefore, we recommend that you use a 64-bit operating system and CPU.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.