删除完HWADDR和UUID之后不要用setup编辑网卡。
cat >/etc/hosts<<EOF
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.1.5 lb01
172.16.1.6 lb02
172.16.1.7 web01
172.16.1.8 web02
172.16.1.31 nfs01
172.16.1.41 backup
172.16.1.51 db01 db01.etiantian.org
172.16.1.61 m01
EOF
cp /etc/hosts /tmp/
rsync /etc/hosts /tmp/
rsync /etc/ /tmp/
cp /etc/ /tmp/
cp -r /etc/ /tmp/
\rm /tmp/etc/ -fr
ll /tmp/
cp -r /etc/ /tmp/
rsync -a /etc/ /tmp/
ll /tmp/
ll /mnt/
rsync -avz --delete /tmp/ /mnt/
ll /mnt/
\rm /tmp/etc/ -fr
ll /tmp/
rsync -avz --delete /tmp/ /mnt/
ll /mnt/
rsync -avz --delete /tmp/ /mnt/
推送 本地 /etc/hostname 到 nfs01 的 /tmp下面
[root@backup ~]# scp /etc/hostname 172.16.1.31:/tmp
The authenticity of host '172.16.1.31 (172.16.1.31)' can't be established.
ECDSA key fingerprint is SHA256:FHH2JDQ2KJILsBGnTrUMEZLfNwYUDA5iW7O9rN6K3UE.
ECDSA key fingerprint is MD5:7c:31:29:22:de:ea:52:7b:b0:ea:27:f1:ed:f9:de:d5.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.16.1.31' (ECDSA) to the list of known hosts.
root@172.16.1.31's password:
Permission denied, please try again.
root@172.16.1.31's password:
hostname
[root@backup ~]# #把 /etc目录 推送到 nfs01的 /tmp下面
[root@backup ~]#
[root@backup ~]# scp /etc/ 172.16.1.31:/tmp
root@172.16.1.31's password:
/etc: not a regular file
[root@backup ~]# scp -r /etc/ 172.16.1.31:/tmp
root@172.16.1.31's password:
把/etc目录推到 nfs01的/tmp下面
rsync -av /etc 172.16.1.31:/tmp/
把nfs01的/etc/hostname 拉到本地/tmp下面
rsync -avz 172.16.1.31:/etc/hostname /tmp/
[root@backup ~]# rsync -avz 172.16.1.31:/etc/hostname /tmp/
root@172.16.1.31's password:
receiving incremental file list
hostname
sent 43 bytes received 96 bytes 55.60 bytes/sec
total size is 6 speedup is 0.04
[root@backup ~]# cat /tmp/hostname
nfs01
[root@backup ~]# rsync -av /etc 172.16.1.31:/tmp
root@172.16.1.31's password:
bash: rsync: command not found
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: remote command not found (code 127) at io.c(226) [sender=3.1.2]
visio 画出综合架构图片
https://edu.51cto.com/course/6334.html
[root@backup ~]# rsync -avz /etc 176.16.1.31:/tmp
ssh: connect to host 176.16.1.31 port 22: Connection refused
rsync: connection unexpectedly closed (0 bytes received so far) [sender]
rsync error: unexplained error (code 255) at io.c(226) [sender=3.1.2]