1. how to install JAVAJDK on CentOS: directly use rpm to download [html] viewplaincopyprint? Http://www.oracle.com/technetwork/java/javase/downloads 1. CentOS Install java jdk Method 1: directly install with 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?
- Yum install jdk-8u5-linux-x64.rpm
Method 2: install openJDK
[Html]View plaincopyprint?
- Yum list | grep openj # View software installation
[Html]View plaincopyprint?
- Yum install java-1.7.0-openjdk
2. Install java jdk in Ubuntu Method 1: install OpenJDK
[Html]View plaincopyprint?
- Sudo apt-get install openjdk-7-jdk
This can be directly installed, or you can directly query the installation.
[Php]View plaincopyprint?
- Sudo apt-get install openjdk and press the TAB key. The program automatically searches for software that starts with openjdk.
[Html]View plaincopyprint?
- The program will output Display all 311 possibilities? (Y or n), press y to list the software.
Enter the following information to start installation.
[Html]View plaincopyprint?
- Sudo apt-get install openjdk-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?
- Sudo apt-get install alien
Then, convert the format to install.
[Html]View plaincopyprint?
- Alien-I jdk-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-d jdk-8u5-linux-x64.rpm # generate Debian package