Note: You should be logged on as slacuserid@glastlnx07 slacuserid@fermilnx-v14 , e.g. chee@glastlnx07 chee@fermilnx-v14 when installing java patches and versions. Once the chee account has downloaded the files use the scp command to copy files across to glast@fermilnx-v14 if you are not logged in to the host (scp how-to).
...
Basic Steps
...
From glast@fermilnx copy files from chee@fermilnx, not the other way around otherwise the file permissions will be set for chee not glast.
Basic overview
- down load the files from the java download site to /tmp. You will use gtar -C <path> or execute *.bin to put the files to the directory.
- check space availablity for each target directory by running /afs/.slac/package/java/common/install/checkQuota
- make sure you are in the shadow directory, e.g. /afs/.slac... and not /afs/slac (dot slac, not just slac)
- IF you get an executable (*.bin) then use the installJava script and you create the jdk-* subdirectory under each OS directory first, e.g. linux, solaris, etc.
- IF you get zipped tarballs (*.gz) use the installJava7 script which uses gtar -C to unpack and create/install the directories.
- change the patch variable in the install script (installJava or installJava7) to the latest patch number
- cd to the place where you downloaded all the files, e.g. /tmp on glastlnx07fermilnx-v14
- Make sure to change the patch number before running the script.
- Edit the install script and check that the new version names will unpack properly. Run the installJava* script.
- run the release script to deploy the new versions to the read-only disk.
- restart the test server and check that everything still works
- restart all the other servers. Use the server monitoring page to do this. If that doesn't work, logon to the machine and run the stop/start scripts.
- update the web page (see url address below)
- announce to mailing lists (see list names below)
- (optional) if you need to change the default version update javawrap script
Download sites:
Main site http://www.oracle.com/technetwork/index.html
...
Download to /tmp, the set of files that match the pattern:
Pattern | Example | AFS Directory |
---|---|---|
jdk-*-linux-i586.bin | jdk-6u26-linux-i586.bin | i386_linux |
jdk-*-linux-i586.tar.gz | jdk-7u1-linux-i586.tar.gz | i386_linux |
jdk-*-solaris-sparc.sh | jdk-6u26-solaris-sparc.sh | sun4x_55 |
jdk-*-solaris-sparc.tar.gz | jdk-7u1-solaris-sparc.tar.gz | sun4x_55 |
jdk-*-linux-x64.bin | jdk-6u26-linux-x64.bin | amd64_linux |
jdk-*-linux-x64.tar.gz | jdk-7u1-linux-x64.tar.gz | amd64_linux |
jdk-*-solaris-sparcv9.sh | jdk-6u26-solaris-sparcv9.sh | sun4x_55/lib/sparc |
jdk-*-solaris-sparc.tar.gz | jdk-7u1-solaris-sparc.tar.gz | sun4x_55 |
Make sure there is sufficient space in the target directories by running
...
shadow path = /afs/.slac/package/java/directory_name (note the dot in the path; the ls command will not show this dir)
directory_name | afs volume of visible path | afs volume of shadow path |
---|---|---|
i386_linux | pkg.java.i386_linux2.read | pkg.java.i386_linux2 |
amd64_linux | pkg.java.amd64_linux.read | pkg.java.amd64_linux |
*sun4x_55 | pkg.java.sun4x_55.readonl | pkg.java.sun4x_55 |
...
cd to /tmp where you should have downloaded all the files and execute installJava(7) from there. If using tarballs then cd to /tmp on glastlnx07fermilnx-v14.
Deploy the new versions
The script /afs/slac.stanford.edu/package/java/build/release is a bourne shell script that assembles the names of the volumes in the java directory that will be updated and then makes calls to the vos_release command which in turn calls vos commands to update a release. The same script is in the shadow directory but it refers to the visible path when building the package list. If you make changes to after the installation then you must rerun the script to pick up the changes. For example, if you change the symlink for a java version.
...
For other experiments that do not have this application, you must log on to each server and restart it manually.
Changing Java Versions
Update the script /afs/.slac.stanford.edu/package/java/common/bin/javawrap and set JAVAVER=<version>, e.g. JAVAVER=1.7.0
Updating the Web Page
Update the web page in the shadow directory (the visible directory is read-only).The path is /afs/.slac.stanford.edu/package/java/common/doc. Use the path plus index.html in the browser location window to view your changes. Once the code is released the web page will also be updated with the copy in the shadow directory.
...
Announce via Mailing Lists
Email Address | Type | Authorization Needed | Comment |
---|---|---|---|
slac-java@slac.stanford.edu | majordomo listserv | no |
|
lcd-dev@slac.stanford.edu | majordomo listserv | need membership | ask Norm Graf to post if you are not a member of this list |
comp-change | majordomo listserv | yes | unix-admin can post so email your message to them and ask them to post it. |
Fermi datalist | campus list | yes | need to be Fermi collaborator. Post via the web url: |
Policy File
For new java versions you may also need to install a new policy file. These files
should go into a jce directory.
Policy File | Location | Download |
---|---|---|
jce-1-5 | /afs/.slac.stanford.edu/package/java/common/jce-1.5 | ? |
jce-1-6 | /afs/.slac.stanford.edu/package/java/common/jce-1.6 | http://www.oracle.com/technetwork/java/javase/downloads/index.html |
jce-1-7 | /afs/.slac.stanford.edu/package/java/common/jce-1.7 | http://www.oracle.com/technetwork/java/javase/downloads/index.html |
...
- cd /afs.slac.stanford.edu/package/java (the shadow directory)
- edit PACKAGE.LINKS (add the softlink to the @sys list, e.g. i386_rhel60)
- cd /afs/.slac.stanford.edu/package/build
- invoke /usr/local/bin/vos_release pkg.java
Comments
Currently Java 6 (a.k.a 1.6.0) and Java 7 (a.k.a 1.7.0) and Java 8 (aka 1.8.0) are installed centrally in
/afs/slac.stanford.edu/package/java and linked from /usr/local/bin. The installed versions are:
Java 1.6.0 -> 1.6.0_41
Java 1.7 -> 1.7.0_55
Java 1.8 -> 1.8.0_20
When invoking Java via
/usr/local/bin/java
it defaults to using Java 7, although this can be controlled by setting
setenv JAVAVER 1.7
On Feb. 25, 2013 the default version will change from Java 6 to Java 7
When making softlinks, in the old days of java 1.6* the convention was to softlink from java 1.6.0 -> <current prod version> but later in java 7 the zero was dropped to java 1.7 -> <current version> so to maintain the same naming convention point java 1.7 -> java 1.7.0 -> <current prod version> just to keep the naming convention the same as it was in java 1.6.
Date | Java Directory | Astore directory | Comments |
---|---|---|---|
12 Nov 2014 | /afs/.slac.stanford.edu/package/java/amd64_linux | /nfs/astore/g/glstore/amd64_linux_javadir.tar.gz | Back up directory so I can delete versions from the package area |
/afs/.slac.stanford.edu/package/java/i386_linux2 | /nfs/astore/g/glstore/i_386_linux2_javadir12nov2014.tar.gz | Back up directory so I can delete versions from the package area | |
/afs/.slac.stanford.edu/package/java/sun4x_55 | /nfs/astore/g/glstore/sun4x_55_javadir12nov2014.tar.gz | Back up directory so I can delete versions from the package area |
Maven Versions - How to install new version
- login as glast or srs on host like fermilnx-14.
- Use the command 'wget -v <url>' to download the version of maven from maven home/Download. Select the closest mirror site.
- Download the file to the shadow directory /afs/.slac/package/java/common/contrib, unzip and untar the file
- Run the release command /afs/slac/package/java/build/release (7 and 8 are the same except one says '7' the other says '8'
- or Run the release command with the argument 'common' to just release maven
- Done. Don't need to announce it.