web01搭好的網站copy到web02

來源:互聯網
上載者:User

標籤:scp

yum nginx php

從web01 傳輸檔案給web02

修改nginx的設定檔

[[email protected] html]# cat /application/nginx/conf/nginx.conf

worker_processes  1;


error_log  logs/error.log error;

pid        logs/nginx.pid;


events {

    worker_connections  1024;

}


http {

    include       mime.types;

    default_type  application/octet-stream;

    sendfile        on;

    keepalive_timeout  65;

    log_format  main  ‘$remote_addr - $remote_user [$time_local] "$request" ‘

                      ‘$status $body_bytes_sent "$http_referer" ‘

                      ‘"$http_user_agent" "$http_x_forwarded_for"‘;

    include extra/*.conf;

}


記得先備份



scp -p22 extra/* 172.16.1.7:/application/nginx/conf/   推送extra下的檔案給web02 前提是裡面沒有目錄 目錄推不過去

先在web01上打包然後再傳

[[email protected] html]# tar zcf bbs.tar.gz bbs/*

[[email protected] html]# tar zcf blog.tar.gz blog/*

[[email protected] html]# tar zcf www.tar.gz www/*

[[email protected] html]# ls

50x.html  bbs  bbs.tar.gz  blog  blog.tar.gz  index.html  www  www.tar.gz



開始推送

推送過去的是壓縮檔 開啟後就是目錄了

scp -p22 bbs.tar.gz 172.16.1.7:/application/nginx/html/

scp -p22 blog.tar.gz 172.16.1.7:/application/nginx/html/

scp -p22 www.tar.gz 172.16.1.7:/application/nginx/html/



本文出自 “12215961” 部落格,請務必保留此出處http://12225961.blog.51cto.com/12215961/1902079

web01搭好的網站copy到web02

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.