Skip to content

Instantly share code, notes, and snippets.

@altyn
Last active May 6, 2017 12:45
Show Gist options
  • Save altyn/e6e22d9cdc23c48797bdf22bd4b82ee3 to your computer and use it in GitHub Desktop.
Save altyn/e6e22d9cdc23c48797bdf22bd4b82ee3 to your computer and use it in GitHub Desktop.

Installing Echoprint server in Ubuntu (works on 14.04)

First check the necessary packages are installed

sudo apt-get install zlib1g-dev
sudo apt-get install libbz2-dev

Installation Tokyo Cabinet

The newest version is 1.4.32 now, you can check it at SourceForge

wget http://sourceforge.net/projects/tokyocabinet/files/tokyocabinet/1.4.32/tokyocabinet-1.4.32.tar.gz
tar xvf tokyocabinet-1.4.32.tar.gz
cd tokyocabinet-1.4.32
sudo mkdir /usr/local/tokyocabinet-1.4.32/
./configure --prefix=/usr/local/tokyocabinet-1.4.32/
make
sudo make install

Installation Tokyo Tyrant

The newest version is 1.1.33 now, you can check it at SourceForge Here more than one to specify Tokyo Cabinet path, the other is the same

wget http://sourceforge.net/projects/tokyocabinet/files/tokyotyrant/1.1.33/tokyotyrant-1.1.33.tar.gz
tar xvf tokyotyrant-1.1.33.tar.gz
cd tokyotyrant-1.1.33
sudo mkdir /usr/local/tokyotyrant-1.1.33
./configure --prefix=/usr/local/tokyotyrant-1.1.33/ --with-tc=/usr/local/tokyocabinet-1.4.32/
make
sudo make install

Then you should copy .so file, make symbol link manually for normal execution ttserver

cd /usr/local/tokyotyrant-1.1.33/
sudo ln -s /usr/local/tokyocabinet-1.4.32/lib/libtokyocabinet.so.8 lib/

And then to test ttserver whether the normal operation The following ignored, although the official website README.md is for us to use ttservctl But for unknown reasons ttservctl Will not be open up ttserver

/usr/local/tokyotyrant-1.1.33/sbin/ttservctl start

If the command ttserver can not be found back ttserver,To modify it ttservctl This one script inside PATH:

PATH="$PATH:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/tokyotyrant-1.1.33/bin"

Above ignored Open another one screen carried out server:

sudo /usr/local/tokyotyrant-1.1.33/bin/ttserver

See the following line that there is listen:

2013-06-28T18:54:22+08:00 SYSTEM listening started

And then back to the original screen put a key-value pair

/usr/local/tokyotyrant-1.1.33/bin/tcrmgr put localhost test test1

Put all the stuff list come out:

/usr/local/tokyotyrant-1.1.33/bin/tcrmgr list localhost

If there is "test" This one key It was successful!

Boot automatically Tokyo Tyrant You can use administrator privileges crontab:

sudo crontab -e

Write it in crontab script

@reboot /usr/local/tokyotyrant-1.1.33/bin/ttserver

Finally, this article is to download their own source to install Not sure to install directly with apt-get is not feasible Theoretically set should be the same, but I have not tried

sudo apt-get install libtokyocabinet-dev
sudo apt-get install libtokyotyrant-dev

Installation Echoprint-server (And solr)

mkdir ~/echoprint-server
cd ~/echoprint-server
git init
git pull git://github.com/echonest/echoprint-server.git

And then perform to see if there is a problem:

cd ~/echoprint-server/solr/solr
java -Dsolr.solr.home=$HOME/bin/echoprint-server/solr/solr/solr/ -Djava.awt.headless=true -jar start.jar

OK, then the solr will be set to boot:

vim ~/startsolr.sh
#!/bin/sh
cd ~/echoprint-server/solr/solr
java -Dsolr.solr.home=$HOME/bin/echoprint-server/solr/solr/solr/ -Djava.awt.headless=true -jar start.jar
crontab -e

Add it

@reboot $HOME/startsolr.sh

© June 28, 2013 Link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment