Wednesday, March 28, 2012

New Oracle Solaris Studio 12.3 for Solaris 11 Install instructions (IPS)

Oracle has released new instructions for installing Oracle Studio 12.3 using IPS. This method seems to be aimed at eventually pushing users in to requiring a support contract for using the IPS version of Oracle Studio 12.3. For those with a valid support contract the instructions from Oracle are:
  • Visit Oracle Certificate Requests to request an Oracle Solaris Studio certificate - http://pkg-register.oracle.com
  • Per instructions at site, download and install certificate and key on your system
  • Per instructions at site, add the solarisstudio publisher and install Oracle Solaris Studio 12.3

Sunday, January 1, 2012

HOWTO install Oracle Solaris Studio 12.3 (release version) on Solaris 11 11/11 using pkg (not tgz)

Oracle has finally released Oracle Studio 12.3 to the public, but with one persistent gotcha that was present in the Beta: it isn't (yet) available to install using pkg on Solaris 11. I decided to figure out how to unravel the shar for Solaris 10 so that pkg could install 12.3 and it's a lot more difficult than the Beta was. To give an overview of the process you have a shar that contains a giant .jar file inside it. Once you get that .jar then you can unzip it and you will discover a bunch of .class files plus .jar files with names such as data1.jar. These .jar files actually have the IPS files needed for use with pkg.

The first problem that needs to be overcome is getting the main .jar file out of the downloaded shar. The problem here is that Oracle has made the shar so it detects both the version of Solaris being run and modifications to the shar itself. Since the shar is just a giant shell script it's actually very easy to bypass both.

Step 1: Modifying the shar
Open the shar that was downloaded from Oracle with your favorite text editor (after extracting it from the .tgz). Now modify the following:
Line 113: EXTRACT_ONLY=0
to:
EXTRACT_ONLY=1
Comment out lines 229 and 870

run: sh ./solarisstudio.sh

Step 2: Getting and installing the pkg files
unzip bundle.jar
There will now be a directory structure that's a mixture of .class and .jar files. We are only interested in the .jar files. Make a directory (e.g. mkdir ext). Now: cd data ; find . -name *.jar -exec unzip {} -d `pwd`/../ext \;
cd ../ext ; find . -exec pkgadd -d {} \;

Oracle Studio 12.3 will now be installed in /opt/solarisstudio12.3