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 > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article focuses on "how to deploy the java development environment under CentOS". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to deploy the java development environment under CentOS.
Hardware JDK1.8.0_121 (as of 2017-1-26) CentOS 7 (the latest version so far) download jdk8 to get root permission
The password is not displayed by default, just enter it, and then enter
Get root permission [seeway@localhost /] $su root password: cancel root permission [root@localhost /] # su seeway install JDK
❝
Since the system comes with a server distribution when it is installed, you need to uninstall it, and then download the latest version of java from Oracle.
Uninstall the system comes with java version first check the java version. If it is exactly what you want, skip this step [root@localhost /] # java- version to view JDK information rpm-qa | grep jdkrpm-qa | grep gcjlibgcj-4.1.2-42.el5java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 uninstall yum-y remove java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 other uninstall methods
❝
If the above method does not work, you can try the following methods, collected, not tested.
Uninstall the version of jdk that comes with the system:
Check the built-in jdk: # rpm-qa | grep gcj may see something like the following: libgcj-4.1.2-44.el5 java-1.4.2-gcj-compat-1.4.2.0-40jpp.115 use the rpm-e-nodeps command to delete what is found above: # rpm-e-nodeps java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
Uninstall the jkd version of the rpm installation
Check the installed jdk:#rpm-qa | grep jdk may see similar information as follows: jdk-1.6.0_22-fcs uninstall: # rpm-e-- nodeps jdk-1.6.0_22-fcs
Find the _ unst subdirectory of the jdk installation directory
Execute the command at the shell terminal. / uninstall.sh can uninstall jdk to set up the java installation directory under the usr directory cd / usrmkdir java copy the jdk to the java directory and unzip it into the jdk directory to view the file [root@localhost jdk] # lsjdk-8u121-linux-x64.tar.gz copy file to the java directory [root@localhost jdk] # cp-r jdk-8u121-linux-x64.tar.gz / usr/java and enter the java folder [root@localhost jdk] # cd / usr/java [root@localhost java] # lsjdk-8u121-linux-x64.tar.gz extract the file [root@localhost java] # tar-zxvf jdk-8u121-linux-x64.tar.gz and get the jdk1.8.0_121 folder [root@localhost java] # lsjdk1.8.0_121 jdk-8u121-linux-x64.tar.gz and create a shortcut Unless you want to enter a very long directory ln-s / usr/java/jdk1.8.0_121/ / usr/jdk environment configuration at a time
❝
Found countless configurations on the Internet, but I such a super-low-level rookie always can not play, or the system may be updated, the configuration has changed, and finally do their own food and clothing, and finally successfully installed the JDK!
Enter edit mode
[root@localhost jdk] # vim / etc/profile press I to enter edit mode if it already exists, it will prompt the following message, press e to enter to exchange the file "/ etc/.profile.swp" already exists! Open ([O]) as read-only, edit (E) directly, restore (R), delete swap file (D), exit (Q)
Add configuration at the bottom
Export JAVA_HOME=/usr/jdkexport CLASSPATH=.:$JAVA_HOME/lib/export PATH=$PATH:$JAVA_HOME/binexport JAVA_HOME PATH CLASSPATH
Save exit
All kinds of tutorials on the Internet are mentioned at once when installing jdk, which makes me and other rookies very depressed and press Esc to enter the command mode to enter: wq! This is done. After exiting the vim command study, I will issue a special article to talk about it.
Load configuration information
Source / etc/profile
Check whether the java configuration is complete
[root@localhost jdk] # java-versionjava version "1.8.0mm 121" Java (TM) SE Runtime Environment (build 1.8.0_121-b13) Java HotSpot (TM) 64-Bit Server VM (build 25.121-b13, mixed mode) if it is not normal, it has to be sudo shutdown-r now. This is the legendary restart and try it again. If you have a problem, leave a message to discuss java-version. Under normal circumstances, the following information will appear. I believe you have a deeper understanding of "how to deploy the java development environment under CentOS". 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.