zoukankan      html  css  js  c++  java
  • 两台虚拟机之间拷贝东西

    本机(hadoop1)文件拷贝到其他主机

    操作命令   scp -r module root@hadoop2:/opt/module

      -r递归

      module本地目录

      root操作的用户

      hadoop2主机名

      /opt/module拷贝到虚拟机的目录

    [root@hadoop1 opt]#   scp -r module root@hadoop2:/opt/module
    The authenticity of host 'hadoop2 (192.168.1.102)' can't be established.

    RSA key fingerprint is 46:9b:7a:5c:82:13:e7:d3:54:44:0c:00:2c:6c:eb:24.
    Are you sure you want to continue connecting (yes/no)? yes 输入yes确定
    Warning: Permanently added 'hadoop2,192.168.1.102' (RSA) to the list of known hosts.
    root@hadoop2's password: 在此处输入hadoop2的密码
    [root@hadoop1 opt]#

    把其他主机文件拷贝到本主机(hadoop2)

    操作命令 scp -r root@hadoop1:/opt/module ./module/ 

      -r递归

      root@hadoop1:/opt/module  其他主机(hadoop1)的目录

      ./module/ 

    [root@hadoop2 opt]# scp -r root@hadoop1:/opt/module ./module/
    The authenticity of host 'hadoop1 (192.168.1.101)' can't be established.
    RSA key fingerprint is 46:9b:7a:5c:82:13:e7:d3:54:44:0c:00:2c:6c:eb:24.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'hadoop1,192.168.1.101' (RSA) to the list of known hosts.
    root@hadoop1's password: 在此处输入hadoop1的密码
    [root@hadoop2 opt]#

    主机hadoop1 把hadoop2上的东西拷贝到 hadoop3上

    scp -r root@hadoop1:/opt/module  root@hadoop2:/opt/module

    也可以使用 rsync

  • 相关阅读:
    linux运维之分析系统负载及运行状况
    linux运维之分析日志相关命令(1)
    centos7修改网卡名称为eth0
    LANMP环境编译参数查看方法
    自动化部署之搭建yum仓
    浙大 PAT 乙级 1001-1075 目录索引
    更改docker服务网段分配地址
    MySQL主从复制(Replication for Backup)
    MySQL读写分离-简单思考
    NGINX负载均衡缓存配置
  • 原文地址:https://www.cnblogs.com/lovetl/p/12023564.html
Copyright © 2011-2022 走看看