CISC 474 Spring 2005
Class Participation grade P02
Resin Installation Instructions |
Set up | Install | Start | Deploy | Test |
(CISC474 P02)
The following instructions will guide you through Resin installation and setup on jaguar.cis.udel.edu.
Acknowledgments: Emily Gibson, B.F. Caviness, Luis Mendes and Phill Conrad all contributed to this installation procedure. Questions should be directed to the discussion board on WebCT.
These instructions assume that you are using csh or tcsh as your login shell. If you are using sh or bash, you may need to tailor these instructions to your particular shell. For example, the "setenv" command is specific to csh and tcsh; you may need to use the assignment operator and/or the "export" command with bash.
If you are bash user, or if you run into anything else that needs to be tweaked for specific environments, I invite you to start a discussion with your classmates on the discussion board in WebCT about what adjustments are needed to the generic directions below.
setenv JAVA_HOME /usr/local/j2sdk1.4.0_01Resin will need this for installation.
% source ~/.cshrc
<doc-dir>/usa/$USER/cisc474/public_html</doc-dir>
<http port='8xxx'/>where '8xxx' is your port number.
<!-- - The following entries configuration the examples. You may safely - delete anything from here down. -->Right before this comment, paste the contents of this admin web-app. This will help you keep track of statistics about your deployed web applications.
<!--and change them to look like this (this comments out the "srun" XML tag)
- The srun port, read by both JVM and plugin
- 127.0.0.1 is the localhost
-->
<srun host='127.0.0.1' port='6802'/>
<!--If you don't do this, you may run into errors with "6802" being a "port already in use" when you start up your server.
- The srun port, read by both JVM and plugin
- 127.0.0.1 is the localhost <srun host='127.0.0.1' port='6802'/>
-->
% ./configure
NOTE: Don't type "make" afterwards; just ".configure"
/usa/$USERNAME/cisc474/resin-2.1.16This directory might show up as the result of a pwd command as:
/m/usa-linux/$USERNAME/cisc474/resin-2.1.16
Troubleshooting:
echo $JAVA_HOME
$RESIN_HOME/bin/httpd.sh start
$RESIN_HOME/bin/httpd.sh stop
% mv /usa/$USER/cisc474/resin-2.1.16/doc/* /usa/$USER/cisc474/public_html/Once you have finished your test, you may remove any of the source files in your public_html directory that you like.
Note that throughout the course, your server should be left running when you log off.
For now, if jaguar is rebooted, you'll have to log back on and restart it.
A future homework assignment will involve writing a shell script and a cron job to automatically check periodically (say, every hour) to make sure your server is up, and restart it if needed, but for the time being, you'll have to do that manually. (If you don't know what a cron job is, look into it. :-) )
A hint: the "curl" utility was recently installed on jaguar; among other things, it can be used at the command line to attempt a connection to a web page, and report a status code depending on whether the URL is accessible or not.
Another hint: if you try this, beware the "sorcerer's apprentice" bug... don't create a script that would spawn other scripts, or attempt to fix a broken server in a tight loop indefinitely. If the server won't startup due to a configuration problem, it is better, after some reasonably number of attempts over some reasonable period of time, to just give up and send an email to someone (e.g. to you).
By noon Thursday 2/24, for a "check" class participation grade, please either
"Check-plus" grading may be assigned for the first students who post particularly helpful items to the WebCT board (e.g. how to adapt the instructions for the bash shell, how to solve common problems, etc.).
Do be honest:
I reserve the right to withhold check-plus grading if I suspect someone is manipulating the system (i.e. having their buddy create a fake problem so that they can post a clever answer.)
If you don't make a reasonable attempt at getting Resin installed by the deadline listed above, you might earn a check-minus instead of a check once you do get it running. To avoid that, either get it running by Thursday, or post a message to the WebCT discussion board with specific and detailed information about what problems you ran into.
Note that a zero on this assignment isn't really an option; you have to get this server running eventually in order to do future assignments.
In an upcoming class participation assignment or homework, you'll be asked to get the sample servlet from pp. 30-32 of your textbook up on your resin web site. So if you want to start on that, feel free.
Once that is done, you might also try your hand at the utility for automatically restarting your web server after a system reboot or server crash.
I advise holding off for now on the MySQL setup. We are still determining whether we are going to run one large MySQL configuration under the TA/Instructors account and create accounts for all of you (so MySQL would be running on only one port) or have each of you install your own MySQL installation. Though the latter would give you more experience, due to system load, I'm leaning towards the former. But until we determine that, it would be premature to get MySQL up and running.