Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Managing your Web site and Programming on NJIT University Computing Systems George Blank University Lecturer Getting Started on UCS • This presentation will aid you when using the university computing systems at NJIT. • You can log on to these systems with your NJIT UCID and Password. • If you are accessing NJIT from off campus, you will need to use VPN (Virtual Private Network). • You can store and run your programs from the same location you would use to create a home page. (I suggest that you use sub-directories) Virtual Private Network • See instructions at http://ist.njit.edu/vpn/ • You need to install VPN and establish a VPN connection before you can download software from NJIT or log on to University Computer Systems from off-campus. Downloading Software from NJIT • NJIT provides software for download by students at http://ist.njit.edu/software/ • You need to establish a VPN connection if you are off-campus. Managing your files from a Mac • Mac OS X's built-in command-line SSH and sFTP work just fine with NJIT’s UCS servers. • To use SSH, see http://ist.njit.edu/support/ssh/sshmac.php Connecting to UCS with SSH • One way to manage files on UCS from Microsoft Windows is to use SSH Secure Shell, both in terminal mode to run commands and in file transfer mode to upload and download files. • Find the appropriate version on the Software Download page at http://ist.njit.edu/software/ and follow the instructions. • Once you install the software, run it, then click on Profiles to add a profile with the name of the system you want to access. Then edit it as shown on the following slides. Connection Establishment Walkthrough with Windows and SSH • Connect to NJIT through VPN first Create an SSH connection profile The screen shown is the edit page after you have added a connection profile called OSL20. All you have to add is the full address, osl20.njit.edu and your UCID. Accept the defaults for the other entries. Connect with SSH Secure File Transfer Connected in Terminal Mode • You can use Unix commands from the shell or open a file transfer window (see arrow). Connected in File Transfer mode You can drag files between windows to upload and download them. You can also change directories and delete files. Things to do in SSH Terminal Mode • • • • • http://ist.njit.edu/software/userguides.php You can use basic Unix commands You can edit with Unix editors. You can run Python interactively by typing python You can run a Python program by typing python yourFilename.py • You can compile a C++ program with cpp (You will need to research cpp to use it effectively) • You can use many other languages including Ruby, C and Java. Using Java in Terminal Mode • You may need to set the correct version of Java. The current default is 1.6 because that is needed by the version of Tomcat in use. You may also need to add Java to your path. See next slide for instructions. • You can compile a Java program with javac yourFilename.java • or run it with java yourFilename.class Changing Java Version (tcsh) • You can change the JAVA_HOME setting with: setenv JAVA_HOME /afs/cad/linux/java_1.7.0_25_x64 set path=($JAVA_HOME/bin $path) • You can make the change permanent by appending those lines to your profile at: $HOME/.login Do not do this unless you need to get Java 7 working. Otherwise, use the default settings. Changing Java Version (bash) • You can change the JAVA_HOME setting with: export JAVA_HOME=/afs/cad/linux/java_1.7.0_25_x64 export PATH="$JAVA_HOME:$PATH” • You can make the change permanent by appending those lines to your profile at: $HOME/.profile Do not do this unless you need to get Java 7 working. Otherwise, use the default settings. OpenAFS • You may wish to install OpenAFS on Mac or Windows. This will allow open and save files, and run programs directly from your system. • Find the appropriate version on the Software Download page at http://ist.njit.edu/software/ and follow the instructions. • If you use OpenAFS with an editor or IDE, you may have to set your software to end each line appropriately with LF (Unix) CR (Mac) or CR/LF (Windows). SSH and some editors and IDEs do this automatically. Web servers • If you want other persons to access your HTML files, load them to your public_html folder or a subdirectory and access them from web.njit.edu. • If you want to access sound or video, you have to use the Web server at harp.njit.edu. Both web and harp use the Apache Web server, but web has audio and video disabled to speed up access. • If you want to run JSP or servlets from the Tomcat Web server, ask How do I install Tomcat on AFS? at http://njit.intelliresponse.com/it/ Updating Your Home Page • See http://ist.njit.edu/webhosting/ • While you run your home page from Web or Harp, you should update your files on another system. • Let us assume that your UCID is xyz123 • If you are accessing a file named menu.html from Harp, the URL would be http://harp.njit.edu/~xyz123/menu.html • If you are editing the same file on a UCS host, the path is ( /u/x/y/ are higher level directories to partition user directories) /afs/cad/u/x/y/xyz123/public_html/menu.html Web pages without file names • NJIT Web servers look (in order) for files named index.htm, index.php, index.html, and index.shtml. If one of these files is in the current directory, it will be loaded without specifying the file name. • Example: user xyz123 has a file called index.htm in directory public_html. That file will load with http://harp.njit.edu/~xyz123/ • The home.page.setup tool described at http://ist.njit.edu/webhosting/ will create an index.html and set proper file permissions. NJIT UCS Systems you can access • See http://ist.njit.edu/accounts/accessafs.php • This changes frequently, and may be out of date. Add “.njit.edu” to all system names given. • For Web servers only: web and harp • Linux Labs on GITC second floor: osl1 through osl80 These systems may soon be blocked from remote access outside of rooms 2315C and 2400. • Preferred Systems: afsaccess1, afsaccess2, afsaccess3 and afsaccess4 • Alternates: afsconnect1 and afsconnect2 These systems are heavily loaded and busy. Notes on Access to UCS • Some pages at http://ist.njit.edu/ suggest that you use afs1 thru afs33. All the odd numbers are now redirected to afsconnect1 and all the even numbers to afsconnect2. • The Sun Sparc workstations that were the afs machines were first renamed sunlab1 thru sunlab33, then later disconnected. Those names can not now be used. • NJIT has referred to their Unix-like systems as both AFS (for the Andrew File System) and UCS (for University Computing Systems). UCS is more accurate. • In some cases, the best available information for some Unix applications may be at web.njit.edu, but that site is obsolete, no longer updated, and subject to “Bit Rot.” Use http://ist.njit.edu/ by preference. Applet Security Problems • Java applet security is becoming more restrictive over time due to a large number of Web attacks using Java. • Jar files are required and JNLP is recommended for applets. Jar files should have a manifest file that includes permissions. • Since instructions change over time, search “Deploy Applet” on the Oracle Java Web site for current instructions. • The next few slides show typical problems. Unsigned Applet If Java permissions are restricted, this window may not be shown and applet will be invisible. No Permissions in Manifest File