文章目录
大数据学习之虚拟机准备
使用linux的版本:centos6.8
使用VMware12
虚拟机安装安装完成后后续工作
1.修改IP地址
vi /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.1.160
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
如何查看网关?文章末尾
2.修改网络服务
vi /etc/udev/rules.d/70-persistent-net.rules
# PCI device 0x8086:0x100f (e1000) SUBSYSTEM==“net”, ACTION==“add”,
DRIVERS=="?", ATTR{address}“00:0c:29:a2:b9:24”, ATTR{type}“1”,
KERNEL=="eth", NAME=“eth0”
注意:删掉eth0,将eth1改成eth0(eth0和eth1同时存在才需要操作)
3.重启网络服务
service network restart
4.修改hostname
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=hadoop102
重启生效!
5.ip地址映射
vi /etc/hosts
192.168.23.102 hadoop102
192.168.23.103 hadoop103
192.168.23.104 hadoop104
这里我以三台虚拟机为例,可暂时不配置
6关闭防火墙
及时生效,重启失效
开启: chkconfig iptables on
关闭: chkconfig iptables off
重启生效
查看状态 : service iptables status
开机禁用 : service iptables start
开机启用 : service iptables stop
7.重启linux(reboot)
查看网关
VMware的菜单栏编辑–>虚拟网络编辑器–>选定vmnet8–>NAT设置(s)–>网关IP