1、修改主机名
切换到root
su root
vi /etc/hostname
将内容修改成node11
2、修改IP
vi /etc/sysconfig/network-scripts/ifcfg-ens33
修改内容如下:
TYPE="Ethernet"
BOOTPROTO="static"
DEFROUTE="yes"
PEERDNS="yes"
PEERROUTES="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_PEERDNS="yes"
IPV6_PEERROUTES="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="ens33"
UUID="92080b37-6045-47a2-872c-a832939226f4"
DEVICE="ens33"
ONBOOT="yes"
IPADDR=192.168.1.11
GATEWAY=192.168.1.2
NETMASK=255.255.255.0
DNS1=192.168.1.2
重启网络
systemctl restart network.service
3、修改主机名和ip的映射
vi /etc/hosts
内容修改如下:
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.11 node11
192.168.1.12 node12
192.168.1.13 node13
重启系统:
reboot
此处可以使用mobaxterm连接测试
4、关闭防火墙
Centos7关闭命令:
systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld