Linux software packages installed three methods:
1, tar to extract the installation
2, rpm package installation
3, yum-line installation
JDK installation process:
1, download the JDK installation package
2, check ever installed JDK: rpm -qa | grep jdk, if you first remove the installed rpm -e --nodeps (nodeps not dependent)
If the query did not install, but still be safe to use rpm -qa | grep java, delete those with openjdk, because we want to use the unified version of the company's jdk
3, install JDK
4, configure the environment variables
5. Check whether the installation was successful
Step 3 : 1, tar packet format directly extract, tar -xzvf package name.
2, rpm format packages, use rpm -ivh package name to install, if you forget where jdk installed, use rpm -ql jdk, review the installation directory
3, yum line installation, yum install -y installation package (-y represents executed in all validation yes)
yum: can be automatically downloaded from the server specified RPM package and install, can be handled automatically dependencies and install all dependent packages, again without cumbersome download, install.
yum install package name ------------------- installation package
yum list package name listed packages -----------------------
yum remove package name ----------------- uninstall packages
yum check-update package name ---------- check for updated software packages
yum update package name ------------------ update the samba package
Step 4: . 1, Vim / etc / Profile at the end of the document plus export JAVA_HOME = jdk path export PATH = $ PATH: $ JAVA_HOME / bin
2, save, and reload the resource files, source / etc / profile
Step. 5: Java -version, below shows the successful