Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Hadoop--3.JDK1.7 installation configuration

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Download JDK

JDK1.7 download:

Http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html

II. Installation

1. Modify file name

[root@master src] # mv jdk-7u79-linux-x64.tar.gz\? AuthParam\ = 1473757361_a54f9f6441c4d0741a68b813b6ab1041 jdk-7u79-linux-x64.tar.gz

two。 Extract the file

[root@master src] # tar zxvf jdk-7u79-linux-x64.tar.gz

3. Move Fil

[root@master src] # mv jdk1.7.0_79 / usr/local/

Third, configure environment variables

1. Edit a file

[root@slave1 local] # vim / etc/profile.d/java.sh

Add the following:

#! / etc/sbin/bash

Export JAVA_HOME=/usr/local/jdk1.7.0_79

Export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

Export PATH=$PATH:$JAVA_HOME/bin

two。 Refresh the file

[root@slave1 local] # source / etc/profile.d/java.sh

3. View (the java version does not do the following for)

[root@master ~] # java-version

Java version "1.7.079"

Java (TM) SE Runtime Environment (build 1.7.0_79-b15)

Java HotSpot (TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

4. View installed java

[root@master ~] # yum list | grep java

[root@master ~] # rpm-qa | grep java

5. Uninstall java

[root@master ~] # yum remove java-1.6.0-openjdk* java-1.7.0-openjdk*java-1.8.0-openjdk*

All slave installs JDK

1. Transmit all slave of jdk

[root@master src] # rsync-av / usr/local/jdk1.7.0_79 slave1:/usr/local/

[root@master src] # rsync-av / usr/local/jdk1.7.0_79 slave2:/usr/local/

[root@master src] # rsync-av / usr/local/jdk1.7.0_79 slave3:/usr/local/

[root@master src] # rsync-av / usr/local/jdk1.7.0_79 slave4:/usr/local/

[root@master src] # rsync-av / usr/local/jdk1.7.0_79 slave5:/usr/local/

[root@master src] # rsync-av / usr/local/jdk1.7.0_79 slave6:/usr/local/

two。 Edit configuration file

It's the same as above.

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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report