centos 7 虚拟机克隆后操作记录

20181106 centos 7 虚拟机克隆后操作记录

1、修改主机名

vim /etc/hostname


为了操作方便,先安装 vim
yum install vim -y

2、修改网卡 ip

编辑 /etc/sysconfig/network-scripts/ifcfg-eth0

首先  ip a,看看自己是哪一个网卡(这里假设是eth0)

3、修改dns地址

/etc/resolv.conf 

4、禁止root账户ssh登录

vim /etc/ssh/sshd_config
找到 PermitRootLogin yes更改为no

重启ssh
systemctl restart sshd
不起作用? 干脆! Reboot

猜你喜欢

转载自my.oschina.net/u/1440971/blog/2872501
今日推荐