TechArena Community

TechArena Community (http://forums.techarena.in/)
-   Tips & Tweaks (http://forums.techarena.in/tips-tweaks/)
-   -   How to Install Java on Solaris (http://forums.techarena.in/tips-tweaks/1462352.htm)

XDRoX 23-04-2012 07:28 PM

How to Install Java on Solaris
 
Installing Java 6 on Solaris 10 64bit

Installing Java provides two-way: using pkgadd or through self-extracting file. The first dilemma is choosing which of the two formats is that we want to use, and well, this depends largely on what kind of applications we have installed and certified.

I mean, imagine we have an application APP which is certified only and exclusively for Java 1.5.x, and incompatible with 1.6.x. In this situation we have two solutions:
  • PATH correctly set so that only running version 1.5.x
  • Do not install another virtual machine other than the 1.5.x
Well, on the basis that we do not have these problems, and focusing on the topic of the post, let's see what are the differences between the self-extracting installations using pkgadd.

Installation with <pkgadd>

This type of installation requires access as <root> as we register the package in the database software installed Solaris. Has the advantage that if we perform an installation of patches, to be declared on the basis of software installed, you may apply the necessary automatically.

We should note that if we do this from the global zone, and do not say otherwise, it will install in all areas, this may be a type of problem when we have several areas with different requirements for Java, ie Oracle, Tomcat, ActiveMQ, ...

The first thing to do is download Java 6 JDK or JRE from Sun and select the architecture of our platform, in my case Solaris SPARC.


In the download page after logearnos, we will have four options:
  • jdk-VERSION-solaris-sparc.tar.Z
  • jdk-VERSION-solaris-sparcv9.tar.Z
  • jdk-VERSION-solaris-sparc.sh
  • jdk-VERSION-solaris-sparcv9.sh

<tar.Z> Versions is the type of installation with pkgadd and versions to versions selfextracting <sh> also 64-bit versions are referenced as SPARC and 32-bit sparcv9 as sparc. Then let us see how to install the packages, (really the same process as any other package in Solaris, in my example but you can select install all you want to install)
Code:

# Zcat jdk-6u17-solaris-sparc.tar.Z | tar xpf -
# Pkgadd-d

.

Select package (s) you wish to process (or 'all' to process all packages). (Default: all) [?,??, Q]: all

The installer will do this task for each of the zones. Once completed, you already have Java installed our version

Installing from file sh

This type of installation is <root> privileges, since it is a shx file (self extracting) and therefore only need write permissions on the directory in which we extract it, however, unlike the installation using < pkgadd> is not reflected in the database installed software, and therefore, when patch is installed it will not apply changes to the package JDK.

Continuing with the installation using sh file, I extract it in / usr / jdk / instances and so if I need to be root

This time, we are interested <sh> versions of Sun's download page. Remember that when transferring files to the server via ftp if we do, we assign the transfer type as binary since it does not extract properly. If we use sftp, no problem

Once uploaded to the server, simply owe you run in the directory you want to remove, for example, in my case are the sh $ HOME/jdk/6 / and I want to install in / usr / jdk / instances so I do the following
Code:

# Cd / usr / jdk / instances
# Sh $ HOME/jdk/6/jdk-6u17-solaris-sparc.sh

Now get a license message, press Q and accept the license
Do you agree to the license terms Above? [Yes or no]
yes
Repeat the same procedure for the 64bit version
Code:

# Cd / usr / jdk / instances
# Sh $ HOME/jdk/6/jdk-6u17-solaris-sparcv9.sh

We have completed the installation of Java.

Make this the default version

After installing the new version of Java, our system will call the version of Java you have on the PATH, ie / usr / bin / java is a link to / usr / java / bin / java, so to make be our default we have two options:
  • Set the PATH environment variable like PATH = / usr/jdk/instances/jdk1.6.0_17/bin: $ PATH
  • Delete and create the link from / usr / java / usr/jdk/instances/jdk1.6.0_17 /

See how to recreate the link
Code:

# Which java
# Ls-l / usr / bin / java
# Ls-l / usr / java
# Rm / usr / java
# Ln-s / usr/jdk/instances/jdk1.6.0_17 / usr / java
# Java-version

Conclusions
In both cases, the Java installation is not of major problem, however, the decision to install one way or another depend mainly on the type of software we have installed.

GoutamB 23-04-2012 07:39 PM

Re: How to Install Java on Solaris
 
Do you know how to Configure and Enable Java in Solaris 10
  • Go to the plugins subdirectory of Mozilla installation.
  • Create a link to the Java plugin file. In this example, directory> <Java installation directory stands for any to have Java installed. Type "A s <Directory <Java installation / plugin/sparc/ns610/libjavaplugin_oji.so". Be sure to include space and at the end.
  • Mozilla Home. Click "Edit". Click "Preferences". Click "Advanced". Select "Enable Java".


All times are GMT +5.5. The time now is 10:35 AM.