日韩无码专区无码一级三级片|91人人爱网站中日韩无码电影|厨房大战丰满熟妇|AV高清无码在线免费观看|另类AV日韩少妇熟女|中文日本大黄一级黄色片|色情在线视频免费|亚洲成人特黄a片|黄片wwwav色图欧美|欧亚乱色一区二区三区

RELATEED CONSULTING
相關(guān)咨詢
選擇下列產(chǎn)品馬上在線溝通
服務時間:8:30-17:00
你可能遇到了下面的問題
關(guān)閉右側(cè)工具欄

新聞中心

這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
CentOS7系統(tǒng)遷移具體方案

本篇文章重點為大家講解一下CentOS7系統(tǒng)遷移具體方法,有需要的小伙伴可以參考一下。

實驗環(huán)境:

系統(tǒng):centos7 ip:172.16.1.101 server1部署nginx,再裝一臺新的server2 和server1一樣的環(huán)境但是不部署軟件,實驗要求遷移之前訪問server1的nginx可以訪問,訪問server2的nginx可以訪問。

server1部署nginx

[root@localhost ~]# tar xf nginx-1.11.2.tar.gz
[root@localhost ~]# ./configure
[root@localhost ~]# make
[root@localhost ~]# make install

編輯index.html

[root@localhost html]# cat index.html aaaaaaaaa this is a test!

測試nginx

[root@localhost html]# curl  172.16.1.101
aaaaaaaaa
this is a test!

將重要目錄打包

–exclude 指定的目錄不打包 –warning 略過報錯

[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

登錄server2進行遷移

可以用拷貝的方式,我這里先在server配置成172.16.1.102 通過scp傳過來 cd /

[root@localhost html]# scp root@172.16.1.101:/backup.tgz .
[root@localhost /]# cd /
[root@localhost /]#
[root@localhost /]# tar xvpfz backup.tgz -C /
[root@localhost /]# restorecon -Rv /

測試

關(guān)閉server1 重啟server2訪問172.16.1.101 的nginx

[root@localhost /]# curl  172.16.1.101
aaaaaaaaa
this is a test!

實驗環(huán)境不同,可能會有差異可以考慮uuid或者掛載方面的問題。

總結(jié)

這就是一種簡單的遷移方式,還有其他的方法后面再跟大家介紹


分享文章:CentOS7系統(tǒng)遷移具體方案
轉(zhuǎn)載注明:http://www.5511xx.com/article/dhgghci.html