一,免密登录
在需要免密登录的linux系统中执行命令:ssh-keygen,一路回车设置本机RSA秘钥
在此主机中配置被免密登录的主机
ssh-copy-id 主机名
二,克隆系统后,修改ip和mac地址
1,修改网卡
vim /etc/udev/rules.d/70-persistent-ipoib.rules
把name改成“eth0”
2,改ip地址
vim /etc/sysconfig/network-scripts/ifcfg-eth0 删除UUID,添加新ip,网关,子网掩码,DNS
3,修改主机名
vim /etc/sysconfig/network
三,关闭防火墙(转载)
1,centos6及以下版本
永久生效,重启后不会复原
开启: chkconfig iptables on
关闭: chkconfig iptables off
即时生效,重启后复原
开启: service iptables start
关闭: service iptables stop
关闭步骤
service iptables stop
chkconfig iptables off
2,centos7及以上
查看防火墙状态
firewall-cmd --state
停止firewall
systemctl stop firewalld.service
禁止firewall开机启动
systemctl disable firewalld.service
四,端口
1,lsof -i:port 查看当前端口被哪些程序占用,
例:lsof -i:8080