Open swanwish opened 7 years ago
Change to your home directory and download the Oracle Java 7 JRE RPM with these commands:
cd ~
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/7u79-b15/jre-7u79-linux-x64.rpm"
Then install the RPM with this yum command (if you downloaded a different release, substitute the filename here):
sudo yum localinstall jre-7u79-linux-x64.rpm
Install jre 1.8
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "https://download.oracle.com/otn-pub/java/jdk/8u191-b12/2787e4a523244c269598db4e85c51e0c/jre-8u191-linux-x64.rpm"
I downloaded the jdk installer jdk-7u60-linux-x64.rpm, but I don't know how to install it, and search the internet, the instruction is like below:
The instructions below are for installing version Java 8 Update 73 (8u73). If you are installing another version, make sure you change the version number appropriately when you type the commands at the terminal. Example: For Java 8u79 replace 8u73 with 8u79. Note that, as in the preceding example, the version number is sometimes preceded with the letter u, and sometimes it is preceded with an underbar, for example, jre1.8.0_73.
Become root by running su and entering the super-user password. Change to the directory in which you want to install. Type:
For example, to install the software in the
/usr/java/
directory, Type:Uninstall any earlier installations of the Java packages.
Install the package.
To upgrade a package:
Delete the
.rpm
file if you want to save disk space. Exit the root shell. No need to reboot.