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
- wget http://download.redis.io/redis-stable.tar.gz
- tar xvzf redis-stable.tar.gz
- cd redis-stable
- make
- make install
- redis-server
Java and RVM
sudo apt-get install default-jre
List of commands to install Jruby To Install RVM run the following commands
- gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
- curl -sSL https://get.rvm.io | bash -s stable
- source ~/.rvm/scripts/rvm
- rvm install jruby-1.7.10
- 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.
- export JRUBY_OPTS=J-Xmx1024 (set to appropriate JVM, depends on usage)
Installing the collector
- git clone https://github.com/medullan/navocat-collector.git
- cd navocat-collector/
- bundle install - This command will install all the collector dependencies
- 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
- ps -aux | grep puma
- bundle exec pumactl -p JRuby stop