In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article is to share with you about CentOS6.5 tar.gz how to install jdk1.7.0_79 in binary system, the editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article. Let's take a look at it.
To apply for a new Huawei cloud machine, install JDK7 for binary files:
1. Check whether JDK is installed on this machine.
2. Uninstall the installed JDK
View installed JDK packages
[root@csxf java] # rpm-qa | grep jdk
Delete installed JDK (can not be deleted, pay attention to environment variables)
[root@csxf java] # rpm-e java-1.6.0-openjdk-1.6.0.41-1.13.13.1.el6_8.x86_64
[root@csxf java] # rpm-e java-1.7.0-openjdk-1.7.0.161-2.6.12.0.el6_9.x86_64
3. Download the tar.gz binary installation package of JDK to the / usr/java directory
[root@csxf java] # cd / usr/java/
[root@csxf java] # ll
-rw-r--r-- 1 root root 153512879 Jun 23 2016 jdk-7u79-linux-x64.tar.gz
Extract the tar.gz binary file
[root@csxf java] # tar-xzvf jdk-7u79-linux-x64.tar.gz
4. Set environment variables
[root@csxf jdk1.7.0_79] # vim / etc/profile
Add trailing line (G):
Export JAVA_HOME=/usr/java/jdk1.7.0_79
Export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
Export PATH=$JAVA_HOME/bin:$PATH
Make the configuration effective after editing
[root@csxf jdk1.7.0_79] # source / etc/profile
5. Check whether the installation is successful
[root@csxf java] # echo $PATH
[root@csxf jdk1.7.0_79] # java-version
Note:
1. Export PATH=$JAVA_HOME/bin:$PATH, pay attention to putting $PATH at the end. To avoid problems with the old and new versions (the new installation of JDK can overwrite the original installation)
The above is how CentOS6.5 tar.gz carries on the binary installation jdk1.7.0_79, the editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.