Victor Victor - 4 months ago 15
Linux Question

Would installing RPM cause any problems?

Would installing rpm with a server running on putty effect it?I need it so I can start updating java while the server is set up would affect it.

Thanks

CentOS release 6.6 (Final)
x86_64 x86_64 x86_64 GNU/Linux


Here is the operating info that it shows when you log in to putty.

Answer

You can install multiple versions of java and switch it using the alternatives utility. After installing java (using yum or rpm) you can use alternatives to set de default vesion of java that the OS will use.

Example:

alternatives --config java

Output:

*  1           /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.91-1.b14.el7_2.x86_64/jre/bin/java
 + 2           /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.101-2.6.6.1.el7_2.x86_64/jre/bin/java

The + indicates the current version of java that the OS will use.

If you execute java -version you'll see this output:

java version "1.7.0_101"
OpenJDK Runtime Environment (rhel-2.6.6.1.el7_2-x86_64 u101-b00)
OpenJDK 64-Bit Server VM (build 24.95-b01, mixed mode)
Comments