Announcement

Announcement Module
Collapse
No announcement yet.

RF Inspector Version 1 Ubuntu 14.0+ Server Installation Instructions

Page Title Module
Move Remove Collapse
This is a sticky topic.
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • RF Inspector Version 1 Ubuntu 14.0+ Server Installation Instructions

    Ubuntu 14.0+ install

    requirements - tomcat7, java 1.7.0 or higher
    set up virtual ubuntu server select openssh server
    once set up

    vi /etc/ssh/sshd_config and set port to our standard port restart ssh

    /etc/init.d/ssh restart get tomcat

    wget http://mirror.atlanticmetro.net/apac...-7.0.53.tar.gz mkdir /usr/local/tomcat install java

    sudo apt-get install openjdk-7-jre check java version

    java -version make sure it's 1.7 or higher
    locate where java is

    which java /usr/bin/java ls -al /usr/bin/java /usr/bin/java -> /etc/alternatives/java ls -al /etc/alternatives/java /etc/alternatives/java -> /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java add to .bashrc at the bottom

    export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre

    export CATALINA_HOME=/usr/local/tomcat/apache-tomcat-7.0.53 reload .bashrc

    . ~/.bashrc start tomcat

    /usr/local/tomcat/apache-tomcat-7.0.53/bin/startup.sh verify it is working

    http://:8080 shut down tomcat

    /usr/local/tomcat/apache-tomcat-7.0.53/bin/shutdown.sh add tomcat group

    groupadd tomcat add tomcat user and add to group

    useradd -s /bin/bash -d /usr/local/tomcat -g tomcat tomcat

    upload rf-inspector war file to /usr/local/tomcat/apache-tomcat-7.0.53/webapps
    change ownership of tomcat files chown -Rf tomcat:tomcat /usr/local/tomcat/

    Create the file /etc/rf-inspector.properties

    add the following information

    databaseName: /usr/local/tomcat/apache-tomcat-7.0.53/rfInspector
    adminUsername: yourusername
    adminPassword: yourpassword
    readWriteCommunityString: yourstring
    cpeDiscoveryIps: 10.0.0.2
    cpeDiscoverySchedule: 0 0 2 ? * *

    chown tomcat:tomcat /etc/rf-inspector.properties

    add to /usr/local/tomcat/apache-tomcat-7.0.53/conf/Catalina/localhost/rf-inspector.xml


    PHP Code:

    <?xml version="1.0" encoding=UTF-8"?>
    <Context> <Enviromentname="
    rfInspector.configuration" value="file:///XXX" type="java.lang.String"/> </Context>
    save as rf-inspector.xml


    Create the start up script for tomcat in /etc/init.d

    vi tomcat Add the following script

    #!/bin/bash
    # description: Tomcat Start Stop Restart
    # processname: tomcat
    # chkconfig: 234 20 80
    JAVA_HOME=/etc/alternatives/java export JAVA_HOME PATH=$JAVA_HOME/bin:
    $PATH export PATH TOMCAT_HOME=/usr/local/tomcat/bin case $1 in start;
    /bin/su tomcat $TOMCAT_HOME/startup.sh ;; stop;
    /bin/su tomcat $TOMCAT_HOME/shutdown.sh ;; restart)
    /bin/su tomcat $TOMCAT_HOME/shutdown.sh /bin/su tomcat $TOMCAT_HOME/startup.sh ;;
    esac exit 0

    Make it executable.
    add to server startup

    sudo apt-get install sysv-rc-conf start program sys-rc-conf
    click tomcat 2 3 4 5 to start and exit program

    test system


    Troubleshooting Hints

    If you are unable to get to tomcat or get a 404 page, check the server firewall. Allow ports 8080, 8005 and 8010.
    If the rf-inspector will not run, check the following
    • Verify that the rf-inspector.properties file is correct.
      • check for proper spaces, quotes, etc. Yes there is a space after the colon.
      • It must be in the format shown above. Check for proper spaces, quotes, etc.
    • Verify the rf-inspector.xml file is also correct
      • check for proper spaces, quotes, etc. Yes there is a space after the colon.
      • It must be in the format shown above. Check for proper spaces, quotes, etc.
    Have them right click on the files and click properties. It must show xml and properties in the file type field. If not, have them re-save the file as "File Types All" and delete the .txt files.
    If they can get to the login screen but get incorrect password, even if they are using the username and passoword in the rf-inspector.properties file, Have them check to make sure there is not a space after both fields.
    For Debian OS users only Increase the amount of memory for Tomcat 7 to keep it from crashing by changing /etc/default/tomcat7 from

    JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC" to JAVA_OPTS="-Djava.awt.headless=true -Xms512m -Xmx1024m -XX:+UseConcMarkSweepGC"

    also
    create a softlink to the JRE7

    ln -s /usr/lib/jvm/java-7-openjdk-i386/ /usr/lib/jvm/default-java Remove the version 6 link if that is there

    rm ln -s /usr/lib/jvm/java-7-openjdk-i386/ /usr/lib/jvm/default-java
    If you have any more troubleshooting suggestions, contact gtober@zcorum.com..
Working...
X