vi /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.10.11
NETMASK=255.255.255.0
GATEWAY=192.168.138.2
DNS1=114.114.114.114
DNS2=8.8.8.8
重启网络服务
service network restart
hostnamectl set-hostname ‘hadoop01’
安装下载库
yum install -y epel-release
如果是最小化安装,还需安装以下工具:
net-tool:工具包集合,包含ifconfig等命令
yum install -y net-tools
vim:编辑器(可选)
yum install -y vim
rpm -qa | grep -i java | xargs -n1 rpm -e --nodeps
临时关闭防火墙
systemctl stop firewalld
永久关闭防火墙
systemctl disable firewalld
-
克隆,记得关机哈,复制3台
-
修改 hosts 文件,提前添加映射,注意保存退出。(三台都要设置)
vi /etc/hosts
生成公钥和私钥 (三台都要设置)
ssh-keygen,3个电脑都设置
把密码互相告诉对方(三台都要设置)
ssh-copy-id jidian01
ssh-copy-id jidian02
ssh-copy-id jidian03
mkdir softwares
jdk-8u212-linux-x64.tar.gz
hadoop-3.1.3.tar.gz
crontab -e(三个都要做)
tar -zxvf jdk-8u212-linux-x64.tar.gz -C /usr/local/
tar -zxvf hadoop-3.1.3.tar.gz -C /usr/local/
vim /etc/profile
source /etc/profile
core-site.xml
hdfs-site.xml
hadoop-env.sh
vim workers
hdfs namenode -format
start-dfs.sh
C:\Windows\System32\drivers\etc