
Written by Mr Li2020-10-27
CentOS7系统迁移演示 server1部署nginx
帮助手册 Article
这就是一种简单的迁移方式,还有其他的方法后面再跟大家介绍
总结
实验环境不同,可能会有差异可以考虑uuid或者挂载方面的问题。
[root@localhost /]# curl 172.16.1.101aaaaaaaaathis is a test!
关闭server1 重启server2访问172.16.1.101 的nginx
测试
[root@localhost /]# cd /[root@localhost /]# [root@localhost /]# tar xvpfz backup.tgz -C /[root@localhost /]# restorecon -Rv /
[root@localhost html]# scp root@172.16.1.101:/backup.tgz .
可以用拷贝的方式,我这里先在server配置成172.16.1.102 通过scp传过来
cd /
登录server2进行迁移
[root@localhost ~]# cd /[root@localhost /]# tar cvpzf backup.tgz / --warning=no-file-changed --exclude=/proc --exclude=/mnt --exclude=/sys --exclude=/dev --exclude=/tmp --exclude=/backup.tgz
–exclude 指定的目录不打包 –warning 略过报错
将重要目录打包
[root@localhost html]# curl 172.16.1.101aaaaaaaaathis is a test!
测试nginx
[root@localhost html]# cat index.html
aaaaaaaaa
this is a test!
编辑index.html
[root@localhost ~]# tar xf nginx-1.11.2.tar.gz[root@localhost ~]# ./configure[root@localhost ~]# make[root@localhost ~]# make install
server1部署nginx
实验环境:
系统:centos7
ip:172.16.1.101
server1部署nginx,再装一台新的server2 和server1一样的环境但是不部署软件,实验要求迁移之前访问server1的nginx可以访问,访问server2的nginx可以访问。
You may also like
You may be interested
php中的mysql_fetch_row/mysql_fetch_array/mysql_fetch_object的区分区别和使用方法
星期一, 29 7 月 2019By 99122524
1、mysql_fe...
归档
- 2023 年 9 月
- 2023 年 8 月
- 2023 年 7 月
- 2023 年 6 月
- 2023 年 5 月
- 2023 年 4 月
- 2023 年 3 月
- 2023 年 2 月
- 2022 年 11 月
- 2022 年 10 月
- 2022 年 1 月
- 2021 年 12 月
- 2021 年 10 月
- 2021 年 7 月
- 2021 年 4 月
- 2021 年 3 月
- 2021 年 2 月
- 2020 年 11 月
- 2020 年 10 月
- 2020 年 5 月
- 2020 年 4 月
- 2020 年 3 月
- 2020 年 2 月
- 2020 年 1 月
- 2019 年 12 月
- 2019 年 11 月
- 2019 年 10 月
- 2019 年 8 月
- 2019 年 7 月
Calendar
一 | 二 | 三 | 四 | 五 | 六 | 日 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |