重启网络
- [root@localhost ~]# systemctl restart network
- [root@localhost ~]# ping www.baidu.com
复制代码 java:安装、配置
- rpm安装
- [root@localhost Desktop]# ls
- jdk-8u281-linux-x64.rpm
- [root@localhost Desktop]# rpm -ivh jdk-8u281-linux-x64.rpm
- warning: jdk-8u281-linux-x64.rpm: Header V3 RSA/SHA256 Signature, key ID ec551f03: NOKEY
- Preparing... ################################# [100%]
- Updating / installing...
- 1:jdk1.8-2000:1.8.0_281-fcs ################################# [100%]
- Unpacking JAR files...
- tools.jar...
- plugin.jar...
- javaws.jar...
- deploy.jar...
- rt.jar...
- jsse.jar...
- charsets.jar...
- localedata.jar...
- rpm文件安装完成后的默认路径为/usr/java/jdk1.8.0_281-amd64/
- [root@localhost /]# vi /etc/profile
- 追加
- export JAVA\_HOME=/usr/java/jdk1.8.0_281-amd64/
- export CLASSPATH=$JAVA\_HOME$lib:$CLASSPATH
- export PATH=$JAVA\_HOME$\bin:$PATH
- 更新
- [root@localhost /]# source /etc/profile
- 查看java版本
- [root@localhost /]# java -version
- openjdk version "1.8.0\_161"
- OpenJDK Runtime Environment (build 1.8.0_161-b14)
- OpenJDK 64-Bit Server VM (build 25.161-b14, mixed mode)
复制代码 免密前的准备
私钥、公钥
- 私钥:留给自己即本机
- 公钥:发给其他计算机
- 位置:根目录的隐藏目录
复制代码- [root@localhost ~]# cd .ssh/
- [root@localhost .ssh]# ls
- id_rsa id_rsa.pub
- [root@localhost .ssh]# pwd
- /root/.ssh
复制代码 克隆、改名、改IP
- 克隆三台
- hadoop01 192.168.196.71
- hadoop02 192.168.196.72
- hadoop03 192.168.196.73
复制代码 三台机都要做: |