Installing Tokyo Tyrant in custom directory
In the process of testing Tokyo Cabinet and Tokyo Tyrant I just came across some small difficulties setting both up. Although the installation and configuration is almost straigth forward I stumbled about some small issues. The documentation on Tokyo Cabinet/Tyrant is not very comprehensive so far apart from the extensive API documentation. Installation and operations information are rare at the moment. There I've just written down my path to a running and manageable installation, which can easily deployed to several linux servers (OpenSuSE).
Compilation
Tokyo Cabinet
cd /usr/local/src/
wget http://tokyocabinet.sourceforge.net/tokyocabinet-1.4.26.tar.gz
tar xvf tokyocabinet-1.4.26.tar.gz
cd tokyocabinet-1.4.26
mkdir /usr/local/tokyo/cabinet/
./configure --prefix=/usr/local/tokyo/cabinet/
make
make install
Tokyo Tyrant
cd /usr/local/src/
wget http://tokyocabinet.sourceforge.net/tyrantpkg/tokyotyrant-1.1.28.tar.gz
tar xvf tokyotyrant-1.1.28.tar.gz
cd tokyotyrant-1.1.28
mkdir /usr/local/tokyotyrant-1.1.28
./configure --prefix=/usr/local/tokyo/tyrant/ --with-tc=/usr/local/tokyo/cabinet/
make
make install
Setup link to shared library
ln -s /usr/local/tokyo/cabinet/lib/libtokyocabinet.so.8 /usr/lib/
Startup server
/usr/local/tokyo/tyrant/bin/ttserver
Configuration
Tokyo Tyrant comes with a basic RC startup script, that sets some basic options. I didn't like to have so many options set in the rc script itself. Therefore I removed all configuration variables and put them into a config file that is in a etc folder of the tyrant installation. This way I can copy the same etc script on each server and maintain different config files on each server. Additionally the configuration can be found more easily. For now I just left the basic configuration options, but will add the possibility to set all startup options in the config file later.
Copy the Config file to your tyrant installation file (e.g. /usr/local/tokyo/tyrant/etc/) and update the line in the RC script accordingly.











