Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

CentOs Java Update

Solved Go to solution
Highlighted

CentOs Java Update

New Contributor

Hello,

i am trying to update the Java version from 7 to 8 on a Sandbox which is running on CentOS.

If i am trying this with the command:

ambari-server setup

i get asked which version i want to install but after the "upgrade" i have still the Java 7 on the sandbox. I am running it wih root.

I hope someone can help me with this.

Regrads,

Jan

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: CentOs Java Update

Contributor

To shortcut the procedure you can also set the other java version for the whole server:

/usr/sbin/alternatives --config java

This will change the java version for the whole system and not just Ambari and the HDP components.

View solution in original post

5 REPLIES 5
Highlighted

Re: CentOs Java Update

Contributor

I assume that you did not use the 'custom Java' option in the setup dialog, right?

For the update of the used java to work, you will have to make sure that

  • you have internet connection on the host
  • and you must install this JDK on all hosts in the cluster to the same path.

(I guess in the sandbox setup you only have one machine, as long as you did not change it).

After setup completes, you must restart each component for the new JDK to be used by the Hadoop services.Using the Ambari Web UI, do the following tasks:

  • Restart each component
  • Restart each host
  • Restart all services
Highlighted

Re: CentOs Java Update

Contributor

To shortcut the procedure you can also set the other java version for the whole server:

/usr/sbin/alternatives --config java

This will change the java version for the whole system and not just Ambari and the HDP components.

View solution in original post

Re: CentOs Java Update

Contributor

@Jan Bauer - did this solve your question?

Highlighted

Re: CentOs Java Update

New Contributor

Sorry for the late answer,

i had to install it like you said.

But additional i hade to modify all env files for the servies on the Cluster. (Set the new JAVA_HOME Path)

Highlighted

Re: CentOs Java Update

Expert Contributor

I had install new openjdk 1.8 and there is the old 1.6 version on the same version

I use

/usr/sbin/alternatives --config java

changed the java version,

and then use java -version,it shows me the openjdk version is 1.8

but I found /usr/lib/jvm/ linked to /etc/alternatives/java_sdk and still linked to /usr/lib/jvm/java-1.6.0-openjdk.x86_64

So I think nothing changed.

I just set JAVA_HOME to /usr/lib/jvm/java ,and want not to change the java home path after each jdk upgrade.

So I don't know why the /etc/alternatives/java_sdk link not change.

Don't have an account?
Coming from Hortonworks? Activate your account here