Pre-reqs for ICRISAT LIMS Install: Java and the App

(Ref Id: 1345358565)

Of all the tools available the Java JRE (Java Runtime Environment) has the best support for Windows installation. There is no need to repeat the installation procedure here. There is even a test utility that will help you verify that your current installation works via your browser.

The Java JDK (Java Development Kit) is a separate compiler that you also need to download and install. It is not more difficult or time consuming than installing the Java runtime so, again, I won't waste time going over that here.

Next you have to find these tools on your machine after they are installed. Mine are in my Program Files directory (Note: I refer to the the older versions throughout this tutorial. Replace those with your locations when you perform these steps. The current JDK and JRE versions for Windows are both Version 7).

In order to complete the Apache Tomcat installation you have to let it know where to find the JRE and JDK. To do that you have to set two environment variables, JRE_HOME and JDK_HOME as shown below (if you do not know how to set environment variables on Windows try searching for this on Google):

SET JRE_HOME=c:/program files/Java/jre6
SET JAVA_HOME=c:/program files/Java/jdk1.6.0_05

(Note: A rendering program on this site prevents me from using backslashes in path names. When specifying paths in Windows you have to use backslashes.)

Then you can go to the Apache Tomcat download location and run startup in the c:/temp/apache-tomcat-6.0.35/bin directory or wherever your Tomcat is installed.

A new screen appears and a bunch of stuff will be on it about 'Catalina', an Http11AprProtocol, etc. In order to ensure that this thing is working you need to go to http://localhost:8080. That is Tomcat's administration utility. You cannot use the administration link yet because you have to configure for yourself an administrator account. As a security measure Tomcat does not ship with an administrator account configured. You have to do it yourself. You do this by going to the conf directory under the Apache Tomcat home directory and editing the conf/tomcat-users.xml file.

You would think that there was already an administrator role in there that you could just uncomment but there is not so you'll need to add an entry in-between the

tags, like this:

Note: You just saved the administrator password in what we call clear text. This means anybody with access to your machine can just read that password, log in using it, and start administering your server. That is generally a bad idea. If you just try to remove everyone's permissions to the file on Windows Tomcat may issue errors during startup. There are fairly good online resources explaining how to store the password in encrypted form. This is not critical right now since we are just testing but later on this is strongly suggested.

Ok, if you downloaded the tutorial from the ICRISAT website (it is in a Zip file next to the download) and you've seen the Administrators Tutorial->Deploying->Deploy war file->Through Tomcat Manager you will see a different port (8085). You can reconfigure Tomcat for different ports. The out of the box port setting should be 8080. It also shows LIMSpg3.0.0 folder that shows it should contain three files -- LIMSDBScript.sql, LIMSpg3.0.0.war and The last file apparently contains some test data. Whoever created this zip file forgot to put these files inside of that folder since the path is absent from the zip file. No wonder I thought this release did not contain any test data as I (incorrectly) specified in the last post.

Please, when you are zipping your files for release actually put them in the folder where you would like them to actually be stored on the target system. If your solution is called superCereal version 1.x there should be a top level directory inside of your archive called superCereal-v1.x with all of your solution files beneath that file. It makes it much easier for people deploying your solution to find everything and differentiate it from earlier releases.

Otherwise the tutorial is correct: follow the part about choosing the WAR file to deploy by selecting the file and clicking on the Deploy button. When it is done (should take a minute or so) LIMSpg3.0.0 will show up in the applications section.

The last step is to perform some configuration steps so that the application can find the database server and database itself (Note, I'm skipping the SMTP server setup for now). Here you will finish up by editing the configuration file in c:/temp/apache-tomcat-6.0.35/webapps/LIMSpg3.0.0/WEB-INF/config/struts-config.xml in the manner shown in the video tutorial, Administrators Tutorial->Deploying->Deploy war file (can be in 2ways)->Customizing. You can just open the file in Notepad (I recommend backing it up first) and changing the following line:

As you can remember from the last part of the tutorial we set the database name to icrisatlims. Set the username/password combination to,

Note, you should use whatever name PostgreSQL used to create the database. In a default Windows installation that may have been your full name. You can use any superuser username/password combination in that has full access to the icrisatlims database so log into Postgresql (psql -d icrisatlims) and run: du. Your output (in long form for readability) will look something like this:

-[ RECORD 1 ]-------------
Role name | joel
Superuser | yes
Create role | yes
Create DB | yes
Connections | no limit
Member of | {}

Now restart Tomcat by running shutdown:

c:/temp/apache-tomcat-6.0.35/bin> shutdown

Then restart it:

c:/temp/apache-tomcat-6.0.35/bin> startup

This time look for error messages inside of the window output. If the database cannot be accessed you will see some strange messages about being unable to access the database near the lines with INFO that mention LIMSpg3.0.0.war. Finally, test to verify availability by trying to bring up the login screen. Use http://localhost:8080/LIMSpg3.0.0/ You should see a login screen.

That is basically it. There is a small configuration step that still needs to be done but I can include that with the next discussions on the ICRISAT LIMS. You might be wondering why I bothered to include a full description of a LIMS installation. The answer is simple -- commercial systems come with fancy installers that have all of the components you need immediately available. For the most part you will click on 'Next' and enter information when prompted. With a DIY or concept LIMS you should expect to have to retrieve components manually and configure them yourself.

Go Back

Citation: Pre-reqs for ICRISAT LIMS Install: Java and the App. (2012). Retrieved Thu Jul 16 10:16:09 2020, from;iid=readMore;go=1345358565