In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article focuses on "how to install java and configure environment variables in centos7". Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to install java and configure environment variables in centos7.
Installation environment:
Centos7 64 bit
Jdk1.8 64 bit
Xshell Free win10* 64-bit
First, enter first, and you need to check whether your openjdk is uninstalled (or determine whether it exists, because usually centos is pre-installed with openjdk):
Enter rpm-qa in xshell or rpm-qa | grep jdk | grep java
Rpm-qa | grep java
Second, if you have a corresponding openjdk and a response list is displayed, you need to uninstall it.
Enter the rpm-e-nodepstzdata- file name in xshell (this is the file name in the list of openjdk files you view), and then delete it.
Third, create a java repository
1. First, return to the root directory and type cd/.
two。 Then enter mkdir java.
3. Then enter the java directory you just created, and enter cd java.
4. Enter the download address of java and download it.
The operation of steps 1-4 is as follows.
Cd/
Mkdirjava/
Cdjava
Wget-no-Check-certificate-no-cookies-header 'cookie: oraclelicense=accept-securebackup-cookie' http://download. Oracle.com/OTN-pub/java/JDK/8u 171-b11/512 CD 62 EC 5174 c 3487 AC 17 c 61 aa 89 E8/JDK-8u 171-Linux-x64. Tar. Gz5. Check the name of the currently downloaded file, and then extract the downloaded Java file.
Limit switch (Limit Switch)
Tar-zxvfjdk-8u171-linux-x64.tar.gz IV. After completing the above steps, configure the environment variables.
Vi / etc/profile
At the end of the file, add the following code
Export Java _ HOME=/Java/JDK 1. 8. 0 _ 171
Export CLaSS=. $JAVA _ HOME/JRE/lib/rt. Jar: $JAVA _ HOME/lib/dt. Jar: $JAVA _ HOME/lib/tools. Jar
Export path = $Java _ home/bin: $path//, then save and exit. After saving, you must execute the following source / etc/profile to reset the file for it to take effect.
5. Execute the java version to see if the configuration is successful (following indicates that the configuration is successful).
Jave droge'1. 8. 0 _ 144'
Java (TM) Seruntimeenvironment (build 1. 8. 0 _ 144-b01)
At this point, I believe you have a deeper understanding of "how to install java and configure environment variables in centos7". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
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.