Installation on UNIX™

Requirements

  • Java >= 1.7
  • Ant >= 1.7

You can also found another example on asyd's blog about jrds.

CentOS 5.2

jrds expects to run with at least Java 1.7, the default java from Centos is gcj 1.4.2. One should install an earlier version from Sun or Jpackages and then set JAVA_HOME. I used the method two shown on this Centos' wiki.

There is a few gotcha by using stock java tools provided by CentOS. One should install them from jpackage. But don't forget JPackage jpackage-utils compatibility for CentOS 5.x, a workaround for a bug that will not be corrected until Centos 6.0. Recommended packages are ant.noarch, ant-junit.noarch, ant-nodeps.noarch, ant.noarch and ivy.noarch.

CentOS 6.6

The needed packages to install and build jrds are java-1.7.0-openjdk-devel, ant, git, ant-apache-regexp, ant-junit.

Building RRD4j and JRDS

For the impatient, the latest nightly builds are available, the war to embed in a Tomcat server or an archive to run jrds as a standalone server.

JAVA_HOME=/usr/lib/jvm/java-1.7.0
export JAVA_HOME

Get a git clone from github.

git clone git://github.com/fbacchella/jrds.git jrds
cd jrds
JRDS_HOME=$PWD

Resolve dependencies using ivy.

mkdir -p $HOME/.ant/lib
curl -o $HOME/.ant/lib/ivy.jar http://central.maven.org/maven2/org/apache/ivy/ivy/2.3.0/ivy-2.3.0.jar
cd $JRDS_HOME
CLASSPATH=$HOME/.ant/lib/ivy.jar ant resolve

Build the war.

ant

Building extra probes (optional)

Some probes like rpc or jkstat needs external library, check the ant build.xml file and build them.

FIXME

Initial configuration

Create the needed directories

mkdir -p /opt/jrds/{probe,config,log}

Configure /opt/jrds/config/jrds.properties with needed values.

configdir=/opt/jrds/config
rrddir=/opt/jrds/probe
logfile=/opt/jrds/log/jrds.log

Run JRDS in standalone mode

If you want a quick start, just run it standalone, in daemon mode

ant jetty
mkdir -p /opt/jrds/webapp
tar xpf build/jrds.tar -C /opt/jrds/webapp
java -DpropertiesFile=/opt/jrds/config/jrds.properties -jar /opt/jrds/webapp/WEB-INF/lib/boot.jar

You can add -Djetty.port=<port number> parameter if you want another port than the default one (8080).

Run JRDS with Tomcat

If you have a Tomcat installation, it can be used

sudo mkdir -p /opt/jrds/config /opt/jrds/probe /opt/jrds/log
sudo chown -R $USER:tomcat /opt/jrds
cp build/jrds.war /opt/jrds/
sudo -e /etc/tomcat5/Catalina/localhost/jrds.xml

The jrds.xml content is:

<?xml version='1.0' encoding='utf-8'?>
    <Context cookies="false" debug="1" displayName="jrds" 
             docBase="/opt/jrds/webapp" path="/jrds" workDir="work/Catalina/localhost/jrds">
        <Parameter name="propertiesFile" value="/opt/jrds/config/jrds.properties"/>
</Context>

You can now start tomcat

/etc/init.d/tomcat6 start

You can now read the document about how to add devices

 
installunix.txt · Last modified: 2015/07/01 17:25 by root     Back to top