Install java jdk in CentOS 6.5
1. install java jdk using CentOS Method 1: directly install it using rpm
Go to the official website to download
[Html] view plaincopyprint?
- Http://www.oracle.com/technetwork/java/javase/downloads/index.html
Select RPM to download the file. My choice is 64-bit.
[Php] view plaincopyprint?
- Jdk-8u5-linux-x64.rpm
Then run the command to install it directly (the yum execution is *. rpm in the current directory)
[Html] view plaincopyprint?
- Yuminstalljdk-8u5-linux-x64.rpm
Method 2: Install openJDK
[Html] view plaincopyprint?
- Yumlist | grepopenj # View Software Installation
[Html] view plaincopyprint?
- Yuminstalljava-1.7.0-openjdk
2. install java jdk in Ubuntu Method 1: Install OpenJDK
[Html] view plaincopyprint?
- Sudoapt-getinstallopenjdk-7-jdk
This can be directly installed, or you can directly query the installation.
[Php] view plaincopyprint?
- Sudoapt-getinstallopenjdk and press the TAB key. The program automatically searches for software that starts with openjdk.
[Html] view plaincopyprint?
- The program will output Displayall311possibilities? (Yorn), Press y to list the software
Enter the following information to start installation.
[Html] view plaincopyprint?
- Sudoapt-getinstallopenjdk-7-jdk
Method 2: rpm installation and download
In the debian system, the rpm format cannot be directly installed. You must use alien to convert the format to the deb format.
Install
[Html] view plaincopyprint?
- Sudoapt-getinstallalien
Then, convert the format to install.
[Html] view plaincopyprint?
- Alien-ijdk-8u5-linux-x64.rpm # Install directly, this time is too long, first convert to DEB package, then install
Or convert to DEB and install
[Html] view plaincopyprint?
- Alien-djdk-8u5-linux-x64.rpm # generate Debian package