Helpful tips on using University Computer Systems for

Download Report

Transcript Helpful tips on using University Computer Systems for

Helpful tips for working with NJIT University
Computing Systems for Homework and projects
Rafael Orta,
Prashanth Sanagavarapu
and George Blank
Overview
• The information presented here is not original content, it is the result of
gathering spread information around the NJIT web site and the power
points slides in the professor web site; while I was doing my homework
and project I wished this information would be in a single place rather
than have to spend hours looking for it all around. That is why I decided
to put together this compilation of information which I hope would make
your life easier.
Rafael Orta
• Rafael made a good start, so I decided to use his document as my
location for additional information on using the NJIT UCS systems.
More detail is available in the lecture on the Andrew File System in the
CS 633 course.
How do I get an UCS account?
• While most of the time when you register for this class a UCS
and Oracle account is created for you, there are exceptions. So
here is where you can get help when dealing with those
exceptions. Fill this form and get your account.
https://mailsys.njit.edu/%7Eaccts/cgi-bin/new
• You can get additional information about University Computing
Systems here.
http://ist.njit.edu/accounts/afs.php
Prepare your account for Web
Hosting
•
•
You need to set up your home page so the files in your
account can be accessed through a browser. A home page
and a sample index.html file are automatically created for
you when you get a UCID. You can edit that index file or
substitute a file of your own to link to your content. Files
named index.html or menu.html are found automatically
by browsers.
Your homepage is located at http://web.njit.edu/~<UCID>
Substitute your UCID for <UCID>, and do not forget the tilde
(~).
How do I share files in AFS?
This information is very helpful especially while working on a
project as a group
Let’s assume you want to grant to user ro5 access to the
directory project in your account, you type
$fs sa ~/project ro5 rwl
For detailed instructions and more information on AFS
permissions please visit.
http://web.njit.edu/all_topics/AFS/ShareFiles/
Allowing an instructor to run files
in your directory.
Professor Blank would like to have you grant him
permission to read your project directories. User name
is gblank.
$fs sa ~/project gblank rl
Two permissions are required: “read” and “look up” as
specified above, which use the Open AFS fs
command. There is no “execute” permission.
OpenAFS allows any authorized users who have
lookup permission to execute files where the execute
permission is set for the user: -rwx------
How do I setup Tomcat
Tomcat 5.5 is already installed in AFS, all you
have to do is configure your account to be
able to use it.
• Servlets and Java Server Pages can be served on web.njit.edu
from a user's public_html directory.
• First make sure that your login directory is correctly set up for
Web pages.
• Once your login directory is correctly set up, your login directory
and public_html directory can be set up for Tomcat.
How do I setup Tomcat cont.
• /usr/ucs/bin/tomcat.setup configures your login
directory and public_html directory to enable
web.njit.edu to serve servlets and Java server pages.
• Explicit instructions regarding the Tomcat server are
given when tomcat.setup is run.
• To run tomcat.setup, log in to your account on any
AFS Unix client (e.g., afs1.njit.edu to afs36.njit.edu),
and enter: tomcat.setup
How do I setup Tomcat? continued
Note: The Tomcat server restarts daily at approximately 6:00 AM.
When you first set up Tomcat, your servlets will not become
available until after the server completes the restart, which takes
about 30 minutes. Additionally, certain changes to your WEBINF directory will not become available until after the Tomcat
server restarts. Most subsequent changes or new servlets with
be found and executed immediately (no restart required).
More information can be found at:
http://web.njit.edu/all_topics/Servers/Tomcat/
Security Requirement
• Off-campus access to AFS must use Secure Shell (ssh) over a
Virtual Private Network (VPN).
• To download software (including regular VPN) you must use
VPN. This is possible with webvpn. Go to
http://webvpn.njit.edu or follow the instructions at
http://telecom.njit.edu/vpn/WebVPNInstall.html
• Once you have a VPN connection, you can download the Secure Shell
software at http://ist.njit.edu/software/index.php
Connect to UCS and Log In
• Use the Secure
Shell Client and
your UCID
username and
password to log
on the one of the
AFS machines,
such as
afs23.njit.edu:
Use Secure FTP
• You can use the
Secure File
Transfer Protocol
program to
upload your
materials. The
SSH Secure File
Transfer Client is
provided when
you get SSH.
Use Secure FTP
• The SSH FTP Client is a simple drag and drop interface.
Most students should have little trouble figuring it out.
• If you do have trouble, try the Help selection on the menu. If
that does not work, post your problems on Web Board and I
will add enough detail to this presentation to guide you
through it.
NJIT University Computing
Systems available to students
• There are 36 systems running Solaris available,
afs1.njit.edu through afs36.njit.edu. If you are using
Tomcat, please use afs31 through afs35.
• There are 29 systems running Linux at osl1.njit.edu
through osl29.njit.edu.
• There are two Apache web servers available to run
your home page from, web.njit.edu and harp.njit.edu.
Please use harp if you have audio or video files.
• An Oracle database server is available at
prophet.njit.edu.
Install Open AFS on your PC
• You can get a local Open AFS client on your
desktop. This allows you to do things like
open a file directly with Word or Eclipse from
UCS and save it back without copying files
back and forth.
• Full instructions are found at
http://web.njit.edu . Select AFS, then AFS
Windows Client from the menu on the left.
Ports available
• Homework often requires you to specify ports to use as a
program entry point. It is often a bad idea to use the ports
listed in the homework because other students are doing the
same homework at the same time and the first one to take a
port on a particular cpu blocks other users.
• Ports below 1024 have defined functions and are reserved.
Some other ports are predefined, including 8080 for Tomcat,
7000 to 7032 and 7101 for Open AFS, and 1521 for Oracle.
• You can usually use most other ports from 1025 through
65535.
What if I need more space?
• Student teams needing more file space than they are
allocated in their own accounts on OpenAFS for team
projects can get a team project space created for
them.
• Send a request to the professor indicating the
amount of file space required. This will be forwarded
with approval to [email protected], and subsequent
communication will be with the UCS system
administrator.
Problems with applets?
• Many students face problems while running
Applets from AFS .
• some of the common Problems are…
• Applet Not initiated
• Applet loading Failed
• Source not found.
Problems with applet? (cont..)
• (Imaginary) messages from my mail box :
Dear Prof,
My applet works on my laptop but does not work on
web. Please grade my work through screen shot or I
will show it class on my laptop.
• Prof Replies :
Dear student,
This course is “Java and the Web” not “Java on Your
Laptop.”
Failed Loading
The most common problem you see….
This means your applet failed!
Files in Same Folder?
• Did you keep the class files and html document containing the
class file in same folder?
• If you don’t have them in the same folder, it is harder to write the
code to get them to load. (It can be done.)
Ex :
Use single folder to store all related files as above
Backslash in URL
• One of the most common Error Messages is
Loading Applet Failed !!
• Do you have a backslash \ instead of a / in your URL?
(Put mouse pointer over link, look at bottom of screen.)
correct form (bottom of browser):
http://web.njit.edu/~sss49\java.htm
will work in IE on Windows, but not on other browsers, and will not work
on AFS or any Unix version.
Eclipse Setup
• When you see your applet running on Laptop
and it doesn’t run on the Web, especially if you are
using Eclipse, declare all the classes in the default
package. Do not use a package name.
Runningapplet will
work on web
This HelloWorld Applet is
harder to transfer to Web
Small changes in file names
• Another common mistake is to use
different case for the class name in your
html code.
Ex: If HelloWorld.Class is the class file and you misprint it as
Helloworld.class in html code then applet can not find the source and
fails to run.
Check the “W”
HelloWorld, Helloworld, and helloworld are three different names to
Unix and most browsers, although they are the same name to Windows
and Internet Exploder.
References
•
•
•
•
•
•
•
•
http://web.njit.edu/all_topics/AFS/ShareFiles/
http://ist.njit.edu/webhosting/public_html.php
http://ist.njit.edu/webhosting/index.php
http://ist.njit.edu/accounts/afs.php
http://ist.njit.edu/webhosting/step_by_step.php
http://web.njit.edu/all_topics/Servers/Tomcat/
http://web.njit.edu/
http://web.njit.edu/~gblank/