RIB v3.0 (beta) Installation Guide

Environment for running RIB v3.0 RIB v3.0 will be running as a web application, so an environment for running web applications is necessary to run RIB. A typical environment RIB runs on requires the following components: Java JDK, Tomcat web container and MySQL database system. You will also need the Java Runtime Environment (JRE) on any machine that will be running the Java administration Applet. This is not necessarily the same machine that is running RIB. Instructions on how to install these various components are given below, as well as instructions on installing RIB itself. If one or more of these components have already been installed on your system, you can skip the corresponding sections on installing them; if your system has all components installed already, you can go directly to the section on installing RIB v3.0. RIB v3.0 runs on both the Unix and the Windows platforms, so the installation instructions below will be based on these two types of platforms.


Installing Java RIB v3.0 requires JDK 1.4.0 or above. JDK's and JRE's can be downloaded from Sun's website for free. Installation instructions are available from the same page that you download your package from. These instructions will be specific for the platform and version that you have selected. For your conveniences, links are provided here for downloading and documentation. It is recommended that you use the latest version of JDK available. (Note: RPM packages will require root privileges to install.) Download JDK
JDK Documentation (Let <JDK_DIR> denote the installation directory of your JDK)
Unix Notes: Windows Notes:

On Unix, you will need to set the environment variable JAVA_HOME. Depending on your shell either one of these commands should work. This step needs to be done prior to starting Tomcat. This can also be placed in your shell resource file to be set automatically when you login ( e.g. .cshrc ).

tcsh: setenv JAVA_HOME <JDK_DIR>
bash: JAVA_HOME=<JDK_DIR>; export JAVA_HOME

You may also want to add the path to the "Java" command to your PATH environment variable in a similar way.

On Windows, if you will be using your JDK with Tomcat 4.x, you may need to create the JAVA_HOME environment variable. You can do this by going to "Start -> Settings -> Control Panel -> System -> Advanced -> Environment Variables", creating a new variable JAVA_HOME and pointing it to <JDK_DIR>. (Setting the JAVA_HOME environment variable is not required by Tomcat 5.x)

You can also add the path to the "Java" command to your PATH environment variable the same way as described above.

Java Information for RIB:
After installing JDK, please keep track of the path to the Java interpreter (the "Java" command), as RIB will require such information to function properly. Sample paths on the Unix and the Windows platforms are:

Unix: /usr/local/jdk1.5.0/bin
Windows: C:Program FilesJavajdk1.5.0bin

Installing Tomcat RIB v3.0 requires Tomcat 4.1 or above. Tomcat can be downloaded from the Apache Jakarta Project website for free and instructions on installation can also be found there. For your convenience, links are provided here for downloading and documentation. It is recommended that you use the latest version of Tomcat available. Download Tomcat
Tomcat Documentation (Let <TOMCAT_DIR> denote the installation directory of your Tomcat)
Unix Notes: Windows Notes:

On Unix, you can start/stop Tomcat with the commands below:

cd <TOMCAT_DIR>/bin
./startup.sh (to start)
./shutdown.sh (to stop)

On Windows, if you are using Tomcat 4.x, you can start/stop it by going to <TOMCAT_DIR>bin and invoking "startup.bat" to start and "shutdown.bat" to stop.

When using Tomcat 5.x, you can start/stop it by going to "Start -> Programs -> Apache Tomcat 5.x -> Configure Tomcat".

To verify that Tomcat is properly installed and working, open a browser to http://localhost:8080, you should be able to see the Tomcat startup page. Tomcat Information for RIB:
After installing Tomcat, please keep track of the path to where all web applications are kept, as well as the root URL of all web applications, as RIB will require such information to function properly. Sample paths on the Unix and the Windows platforms and a sample root URL are:

Unix: /usr/local/jakarta-tomcat-5.5.4/webapps
Windows: C:Program FilesApache Software FoundationTomcat 5.5webapps
Root URL: http://rib.cs.utk.edu:8080

Installing MySQL RIB v3.0 requires MySQL 4.0 or above. MySQL can be downloaded from the MySQL website for free and the installation guide can be found there too. For your conveniences, links are provided here for downloading and documentation. It is recommended that you use the latest version of MySQL available. Download MySQL
MySQL Documentation (Let <MYSQL_DIR> denote the installation directory of your MySQL)
Unix Notes: Windows Notes:

The documentation describes several ways to install MySQL directed to a user with root privileges. If you do not have root, you should download a source tarball and not an RPM or binary release. These will need write access to /usr/local, you can use --prefix to install the source tarball into your home area. To install MySQL with non-privileged user account you can follow the steps outlined below.
1. Download from here:
http://dev.mysql.com/downloads/index.html
2. tar zxvf mysql-4.x.x.tar.gz
3. cd mysql-4.x.x
4. ./configure --prefix=/home/username/mysql
5. make
6. make test
7. make install
8. cp support-files/my-medium.cnf
/home/username/mysql/var/my.cnf
(this is the path designated with --prefix above, in the var directory)
9. cd /home/username/mysql
(this is the path designated with --prefix above)
10. bin/mysql_install_db
11. bin/mysqld_safe &
12. bin/mysqladmin -u root password 'new-passwd'
(Note: You will need to replace versions and paths to match your version and environment)

On Unix, you can invoke the MySQL command line client with the commands below:

cd <MYSQL_DIR>/bin
./mysql --user=username --password=password

On Windows, if you are using MySQL 4.0, you can invoke the MySQL command line client with the commands below:

cd <MYSQL_DIR>bin
.mysql --user=username --password=password

When using MySQL 4.1, in addition to invoking the MySQL command line client the same way as described above, you can also invoke it by going to "Start -> Programs -> MySQL -> MySQL Server 4.1 -> MySQL Command Line Client".

JDBC Driver:
You also need to get a copy of the JDBC driver for MySQL in order for RIB to access your database through Java. The official JDBC driver for MySQL database is MySQL Connector/J, as provided by MySQL. You can download it through the following link: Download MySQL Connector/J Important: Please copy the .jar file to <JDK_DIR>/jre/lib/ext (also to /lib/ext if you have the JRE installed), since this is the place where the JDBC driver can be found automatically by the Java Virtual Machine (JVM). Otherwise you might receive error messages like "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver" when running RIB. Creating the "rib" database and the "rib" user account
After installing MySQL, you need to create a database named "rib" for the RIB web application. Also, it is highly recommended that you remove the anonymous accounts and create a user account "rib". You should use the "rib" account to access your database instead of using the "root" account for security reasons. You can perform the above tasks with the commands below: (All commands are to be executed by the MySQL command line client.) (Invoke the MySQL command line client, login as "root")
1. Create "rib" database:
mysql> CREATE DATABASE rib;
2. Remove anonymous accounts:
mysql> DELETE FROM mysql.user WHERE User = '';
3. Create "rib" user account:
mysql> GRANT ALL PRIVILEGES ON rib.* TO rib@localhost IDENTIFIED BY 'rib';
mysql> FLUSH PRIVILEGES;
MySQL Information for RIB:
Typical information about the MySQL database that will be used by RIB are:

JDBC Driver: com.mysql.jdbc.Driver
Connection URL: jdbc:mysql://localhost/
Database name: rib
Username: rib
Password: ******

Installing RIB v3.0 Before proceeding to install RIB v3.0 on your system, please make sure the following things have been done:

  1. Java has been installed and functions properly (if not, please go back to Installing Java)
  2. Tomcat has been installed and functions properly (if not, please go back to Installing Tomcat)
  3. MySQL has been installed and functions properly (if not, please go back to Installing MySQL)
  4. JDBC driver has been installed and a database named "rib" has been created (if not, please go back to Installing MySQL)
Once all components required by RIB v3.0 have been properly installed and can function properly, installing the RIB web application becomes a very easy task. RIB v3.0 (beta) can be obtained from the Software page. After downloading, unpack the compressed file under the root directory of all your web applications to create a new web application "rib3app". (Let <TOMCAT_DIR> denote the installation directory of your Tomcat)
Unix Notes: Windows Notes:

Unpack rib3app.tgz under <TOMCAT_DIR>/webapps to create <TOMCAT_DIR>/webapps/rib3app using the command: "gunzip -dc rib3app.tgz | tar -xvf -".

Unzip rib3app.zip under <TOMCAT_DIR>webapps to create <TOMCAT_DIR>webappsrib3app using a third party software like WinZip.

When unpacking is done, you need to configure your RIB v3.0 installation following the steps below:
  1. Make sure your MySQL database server is running
  2. Start your Tomcat web server
  3. Open a browser window
  4. Type in the URL /rib3app/config to launch the web-based configuration interface
    ( here denotes the root URL of all your web applications)
The web-based configuration interface will collect information about your Java JDK, Tomcat web container and MySQL database system. Please make sure you have the following information ready before you start to configure:
  1. Path to your java interpreter (see Java Information for RIB for examples)
  2. Root directory of all your web applications (see Tomcat Information for RIB for examples)
  3. Root URL of all your web applications (see Tomcat Information for RIB for examples)
  4. Database access information (see MySQL Information for RIB for examples)
  5. (optional) Mail server access information (your SMTP server, username, password and etc.)
All collected information will be saved to your "RIBSettings.ini" file under <TOMCAT_DIR>/webapps/rib3app/WEB-INF/classes/edu/utk/cs/rib. You can always go directly to this file and edit it manually to make further changes. See here for a sample "RIBSettings.ini" file and explanations to various entries in the file. If no problem occurs when configuration is done, you need to restart your Tomcat web server to accommodate changes made during configuration, and then you should be able to run RIB v3.0 as a standard web application. The main RIB password to access the RIB administrator's management page is the password you provided in the "Administration Configuration" section.

Setting up auto-update for interoperations In order for RIB to be able to automatically perform updates, you must have set up a scheduled job on the machine where RIB is installed. On Unix machines this is done using the "cron" system utility. Assuming that the RIB web application is installed in the directory /usr/local/jakarta-tomcat-5.5.4/webapps/rib3app, simply add a line such as the following to a crontab: 0,15,30,45 * * * * java -cp /usr/local/jakarta-tomcat-5.5.4/webapps/rib3app/bin:
/usr/local/jakarta-tomcat-5.5.4/webapps/rib3app/WEB-INF/classes UpdateAllInterops (Note: The "-cp CLASSPATH" parameter can not be omitted as "UpdateAllInterops" uses packages that can only be found under the specified CLASSPATH.) This will cause RIB to check the update intervals every 15 minutes. On Windows machines, this can be done through the "Scheduled Tasks" system tool in a similar way.


Should you have any questions about the installation of RIB v3.0, please send them to rib-developers@cs.utk.edu. Thanks.