展开
拓展 关闭
订阅号推广码
GitHub
视频
公告栏 关闭

Xshell使用

  • 新建连接

  • 输入名称和ip

  • 点击连接

  • 输入用户名

  • 输入密码

  • 直接拖动上传文件

[root@master ~]# yum install lrsz
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
base                                                                                   | 3.6 kB  00:00:00     
https://mirrors.aliyun.com/docker-ce/linux/centos/7/x86_64/stable/repodata/repomd.xml: [Errno 14] curl#60 - "Peer's Certificate has expired."
Trying other mirror.
It was impossible to connect to the CentOS servers.
This could mean a connectivity issue in your environment, such as the requirement to configure a proxy,
or a transparent proxy that tampers with TLS security, or an incorrect system clock.
You can try to solve this issue by using the instructions on https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.

extras                                                                                 | 2.9 kB  00:00:00     
mysql-connectors-community                                                             | 2.6 kB  00:00:00     
mysql-tools-community                                                                  | 2.6 kB  00:00:00     
mysql80-community                                                                      | 2.6 kB  00:00:00     
updates                                                                                | 2.9 kB  00:00:00     
No package lrsz available.
Error: Nothing to do
  • 如果报错,使用离线包安装

  • 下载离线包

  • 使用sftp工具上传到服务器

# 修改权限
chmod 755 lrzsz-0.12.20.tar.gz
# 创建文件夹
[root@master /]# mkdir /tool
[root@master /]# mkdir /tool/lrzsz
# 移动到指定文件夹
mv lrzsz-0.12.20.tar.gz /tool/lrzsz/
# 进入指定文件夹
[root@master software]# cd /tool/lrzsz/
# 解压文件
tar -zxvf lrzsz-0.12.20.tar.gz
# 进入解压后的文件夹
[root@master lrzsz]# cd lrzsz-0.12.20
# 配置安装路径
[root@master lrzsz-0.12.20]# ./configure --prefix=/tool/lrzsz/
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
checking for working autoconf... missing
checking for working automake... missing
checking for working autoheader... missing
checking for working makeinfo... missing
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH

# 如果报错,需安装
yum install gcc-c++
# 再次配置
[root@master lrzsz-0.12.20]# ./configure --prefix=/tool/lrzsz/
loading cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... missing
// 。。。
creating config.h

# 编译
make 
# 安装
make install
# 进入该目录
cd /tool/lrzsz/bin
ln -s lsz sz
ln -s lrz rz
# 修改环境变量,在~/.bashrc文件末尾加入export PATH="~/tool/lrzsz/bin:$PATH"
vi ~/.bashrc

source ~/.bashrc
  • 下载文件
# 命令下载
sz [文件名]

# 选择路径
  • 离线安装后仍然报错
# 报错如下
[root@slave1 ~]# rz -E
-bash: rz: 未找到命令

# 再次试用yum安装
yum install lrzsz
  • 导出日志
  • 文件,日志,启动,指定保存路径
posted @ 2023-11-29 13:11  DogLeftover  阅读(31)  评论(0编辑  收藏  举报