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 > Servers >
Share
Shulou(Shulou.com)06/02 Report--
I. Environment
VMware12 Pro
CentOS-6.7-i386-bin-DVD1
Jdk-8u151-linux-i586
Second, detailed installation steps
Premise: you need to uninstall jdk on your Linux
Rpm-qa | grepjdk will show that each package name corresponding to your installation package rpm-e--nodeps that contains the string jdk will uninstall the corresponding package
After that, if java-version shows
It's just unloaded.
I have installed jdk1.7 before, so I need to uninstall it, and the ones that have not been installed start directly from below.
1. Go to the official website to download JDK
Http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
You need to select the little dot in the red box in the picture before you can go down, which means you accept the license agreement.
Because my virtual system is 32-bit, so I put down 32-bit JDK, according to your situation. X86 represents a 32-bit system and x64 represents a 64-bit system.
If you don't know how many bits the server is, use this command directly:
2. Upload and decompress JDK
Some people may not know what the rz command is, but why not yours?
This is a simple upload and download tool, if you haven't installed it, you can install it. It's easy to use.
Check to see if lrzsz is installed before installation:
Rpm-q l lrzsz
If there is no installation, you can install it using the following command:
Yum install lrzsz-y,
Then you can use rz to upload local files to the current directory of the server. Sz is followed by the specified file directory, which can be downloaded from the server to the local directory.
Okay, the uploaded jdk looks like this:
Unzip, wait, wait.
Third, move down the position
In order to make it easier to manage in the future, I changed the directory of jdk and renamed it.
Now go and see that jdk,ok,jdk1.8 already exists. Don't worry about that jdk1.7. I installed it before.
Ls | grep jdk command is a pipe command, which lists the current directory file and retrieves the display containing jdk
Fourth, configure environment variables
Open / etc/profile with vim first
Add at the bottom of the file, save and exit
Run the following command to make the configuration take effect immediately
Now check through the java-version and javac-version commands, and the two results are the same
OK,jdk configuration is complete!
Summary
The above are the detailed steps of installing JDK on the Linxu server introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply you in time. Thank you very much for your support to the website!
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.