CentOS安装scp命令
在测试中需要在两台虚拟机之间传递文件,首先想到的是scp命令,结果提示:-bash: scp: command not found想当然用yum install scp命令安装,结果提示:No package scp available.后来发现scp这东西应该属于openssh-clients这个包,运行:yum install openssh-clien
·
在测试中需要在两台虚拟机之间传递文件,首先想到的是scp命令,结果提示:
-bash: scp: command not found
想当然用yum install scp命令安装,结果提示:
No package scp available.
后来发现scp这东西应该属于openssh-clients这个包,运行:
yum install openssh-clients -y (注:两台机器都需要安装)
[root@localhost local]# yum install openssh-clients -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.pubyun.com
* extras: mirrors.skyshe.cn
* updates: ftp.sjtu.edu.cn
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package openssh-clients.x86_64 0:5.3p1-104.el6_6.1 will be installed
--> Processing Dependency: openssh = 5.3p1-104.el6_6.1 for package: openssh-clients-5.3p1-104.el6_6.1.x86_64
--> Processing Dependency: libedit.so.0()(64bit) for package: openssh-clients-5.3p1-104.el6_6.1.x86_64
--> Running transaction check
---> Package libedit.x86_64 0:2.11-4.20080712cvs.1.el6 will be installed
---> Package openssh.x86_64 0:5.3p1-94.el6 will be updated
--> Processing Dependency: openssh = 5.3p1-94.el6 for package: openssh-server-5.3p1-94.el6.x86_64
---> Package openssh.x86_64 0:5.3p1-104.el6_6.1 will be an update
--> Running transaction check
---> Package openssh-server.x86_64 0:5.3p1-94.el6 will be updated
---> Package openssh-server.x86_64 0:5.3p1-104.el6_6.1 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================================================================================
Installing:
openssh-clients x86_64 5.3p1-104.el6_6.1 updates 437 k
Installing for dependencies:
libedit x86_64 2.11-4.20080712cvs.1.el6 base 74 k
Updating for dependencies:
openssh x86_64 5.3p1-104.el6_6.1 updates 272 k
openssh-server x86_64 5.3p1-104.el6_6.1 updates 321 k
Transaction Summary
=================================================================================================================================================================================================================================
Install 2 Package(s)
Upgrade 2 Package(s)
Total download size: 1.1 M
Downloading Packages:
(1/4): libedit-2.11-4.20080712cvs.1.el6.x86_64.rpm | 74 kB 00:00
(2/4): openssh-5.3p1-104.el6_6.1.x86_64.rpm | 272 kB 00:00
(3/4): openssh-clients-5.3p1-104.el6_6.1.x86_64.rpm | 437 kB 00:00
(4/4): openssh-server-5.3p1-104.el6_6.1.x86_64.rpm | 321 kB 00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 1.3 MB/s | 1.1 MB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : openssh-5.3p1-104.el6_6.1.x86_64 1/6
Installing : libedit-2.11-4.20080712cvs.1.el6.x86_64 2/6
Installing : openssh-clients-5.3p1-104.el6_6.1.x86_64 3/6
Updating : openssh-server-5.3p1-104.el6_6.1.x86_64 4/6
Cleanup : openssh-server-5.3p1-94.el6.x86_64 5/6
Cleanup : openssh-5.3p1-94.el6.x86_64 6/6
Verifying : libedit-2.11-4.20080712cvs.1.el6.x86_64 1/6
Verifying : openssh-server-5.3p1-104.el6_6.1.x86_64 2/6
Verifying : openssh-5.3p1-104.el6_6.1.x86_64 3/6
Verifying : openssh-clients-5.3p1-104.el6_6.1.x86_64 4/6
Verifying : openssh-5.3p1-94.el6.x86_64 5/6
Verifying : openssh-server-5.3p1-94.el6.x86_64 6/6
Installed:
openssh-clients.x86_64 0:5.3p1-104.el6_6.1
Dependency Installed:
libedit.x86_64 0:2.11-4.20080712cvs.1.el6
Dependency Updated:
openssh.x86_64 0:5.3p1-104.el6_6.1 openssh-server.x86_64 0:5.3p1-104.el6_6.1
Complete!
[root@localhost local]#
再运行scp就可以了,再次运行:
[root@localhost local]# scp mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz root@192.168.1.206:/usr/local/
root@192.168.1.206's password:
mysql-5.6.12-linux-glibc2.5-x86_64.tar.gz 100% 292MB 18.3MB/s 00:16
[root@localhost local]#
更多推荐
已为社区贡献3条内容
所有评论(0)