防火墙关闭&设置静态IP
防火墙:
1.关闭防火墙:
systemctl stop firewalld.service
2.禁用防火墙:
systemctl disable firewalld.service
3.查看防火墙:
systemctl status firewalld.service
4.关闭Selinux:
vi /etc/selinux/config
将SELINUX=enforcing
改为SELINUX=disabled
设置IP
一、vi /etc/sysconfig/network-scripts/ifcfg-ens33 (擅用tab键,ens33以实际情况而定)
BOOTPROTO="static"
ONBOOT="yes"
IPADDR=192.168.X.51
GATEWAY=192.168.X.2
DNS1=8.8.8.8
DNS2=8.8.4.4
NETMASK=255.255.255.0
二、 vi /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
- 重启网卡:service network restart
Ø 修改主机名
hostnamectl set-hostname 主机名
Ø IP和主机名关系映射
vi /etc/hosts
192.168.13.111 bigdata111
192.168.13.112 bigdata112
192.168.13.113 bigdata113
在windows的C:\Windows\System32\drivers\etc路径下找到hosts并添加
192.168.13.111 bigdata111
192.168.13.112 bigdata112
192.168.13.113 bigdata113