Linux Setup - medullan/navocat-collector GitHub Wiki

Objective

The aim of this installation guide is to provide you with all the steps needed to install and configure the collector on a Linux system.

Installation Dependencies

  • Git
  • Java
  • Jruby
  • Bundler
  • Redis

Ubuntu (Linux) Installation - The Linux installation guide was tailored for the Ubuntu Linux distribution, but the configuration concepts are typically the same across Linux distributions, the main thing that will differ is the package manager i.e. apt, yum. A quick google search can help with installing the specific program on your Linux distribution, or contact us for assistance.

Git

sudo apt-get install git

Redis

  1. wget http://download.redis.io/redis-stable.tar.gz
  2. tar xvzf redis-stable.tar.gz
  3. cd redis-stable
  4. make
  5. make install
  6. redis-server

Java and RVM

sudo apt-get install default-jre

List of commands to install Jruby To Install RVM run the following commands

  1. gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
  2. curl -sSL https://get.rvm.io | bash -s stable
  3. source ~/.rvm/scripts/rvm
  4. rvm install jruby-1.7.10
  5. jruby -v

JVM Memory Size

By default Jruby caps the memory allocated to the JVM, but to operate the collector at a relatively large scale, naturally it will require more RAM allocated to it, this can be done by updating the JRUBY_OPTS environment variable.

  1. export JRUBY_OPTS=J-Xmx1024 (set to appropriate JVM, depends on usage)

Installing the collector

  1. git clone https://github.com/medullan/navocat-collector.git
  2. cd navocat-collector/
  3. bundle install - This command will install all the collector dependencies
  4. Update the meda.yml file to point to your instance of redis

Running the collector

We suggest running the collector in Puma. Puma is a multi-threaded web server that has great performance on Jruby. Examples of running collector below.

Commands running various puma options

  • puma --environment development --port 8000 --threads 0:4
  • puma --environment production --port 80 --threads 32:32

Stopping the collector

  1. ps -aux | grep puma
  2. bundle exec pumactl -p JRuby stop