xshell链接

xshell链接


ip a 查看当前的网卡以及绑定的IP
2: ens33: mtu 1500 qdisc pfifo_fast state UP qlen 1000
link/ether 00:0c:29:cc:bf:1f brd ff:ff:ff:ff:ff:ff
inet 192.168.2.10/24 brd 192.168.2.255 scope global ens33
valid_lft forever preferred_lft forever
inet6 fe80::8021:b79b:fe71:4c6d/64 scope link
valid_lft forever preferred_lft forever

修改网卡的配置
su - root
vim /etc/sysconfig/network-scripts/ifcfg-ens33

TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
NAME=ens33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.2.10
PREFIX=24

[root@master data2]# cat /etc/sysconfig/network-scripts/ifcfg-ens33
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
NAME=ens33
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.2.10
PREFIX=24

一般linux的配置文件,需要在重启计算机或者重启某些服务的时候生效
systemctl stop firewalld.service
systemctl disable firewalld.service

关闭selinux

vim /etc/selinux/config
SELINUX=disabled

setenforce 0

systemctl stop NetworkManager

systemctl retart network.service
systemctl disable NetworkManager


克隆虚拟机后的修改
网卡

修改主机名
centos7配置主机名
临时修改主机名
hostname master
永久修改主机名
vim /etc/hostname
master

配置hosts
vim /etc/hosts
192.168.2.10 master
192.168.2.11 slave1
192.168.2.12 slave2

你可能感兴趣的:(xshell链接)