lftp 命令是一款优秀的文件客户端程序,它支持ftp、SETP、HTTP 和 FTPs 等多种文件传输协议。lftp 支持 tab 自动补,记不得命令双击 tab 键就可以看到可能的选项了。
默认情况下 CentOS Stream9 下面没有安装 lftp 软件,需要自己手动安装,下面将介绍快速通过 yum 命令进行安装。
(1)使用 yum list 命令搜索库中是否存在 lftp 命令的安装包,如下:
[root@hxstrive ~]# yum list | grep lftp lftp.i686 4.9.2-4.el9 appstream lftp.x86_64 4.9.2-4.el9 appstream
由运行结果可知,存在两个 4.9.2 版本的 lftp 安装包,分别为 32 位和 64 位。
(2)使用 yum install lftp 命令安装即可,如下:
[root@hxstrive ~]# yum install lftp Last metadata expiration check: 0:00:08 ago on Wed 18 May 2022 09:03:59 PM CST. Dependencies resolved. ==================================================================================================================== Package Architecture Version Repository Size ==================================================================================================================== Installing: lftp x86_64 4.9.2-4.el9 appstream 925 k Transaction Summary ==================================================================================================================== Install 1 Package Total download size: 925 k Installed size: 3.0 M Is this ok [y/N]: y Downloading Packages: lftp-4.9.2-4.el9.x86_64.rpm 2.4 MB/s | 925 kB 00:00 -------------------------------------------------------------------------------------------------------------------- Total 505 kB/s | 925 kB 00:01 Running transaction check Transaction check succeeded. Running transaction test Transaction test succeeded. Running transaction Preparing : 1/1 Installing : lftp-4.9.2-4.el9.x86_64 1/1 Running scriptlet: lftp-4.9.2-4.el9.x86_64 1/1 Verifying : lftp-4.9.2-4.el9.x86_64 1/1 Installed: lftp-4.9.2-4.el9.x86_64 Complete!
(3)使用 lftp -v 验证安装是否成功,如下:
[root@hxstrive ~]# lftp -v LFTP | Version 4.9.2 | Copyright (c) 1996-2020 Alexander V. Lukyanov LFTP is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with LFTP. If not, see <http://www.gnu.org/licenses/>. Send bug reports and questions to the mailing list <lftp@uniyar.ac.ru>. Libraries used: idn2 2.3.0, Readline 8.1
如果你能正常看见上面的版本信息,则说明 lftp 安装成功。