RHEL6.6 & CentOS 6如何安装Kerberized FTP client命令
手头一台Linux服务器(Red Hat Enterprise Linux Server release 6.6),写了一个shell脚本,在上面测试运行时,发现Kerberized ftp client命令不存在。注意这里所说的是ftp命令,不是ftp工作站。
[ ~]# more /etc/redhat-release Red Hat Enterprise Linux Server release 6.6 [ ~]# ls /usr/kerberos/bin/ftp ls: cannot access /usr/kerberos/bin/ftp: No such file or directory [ ~]# [ ~]# whereis ftp ftp:
之前印象中,Kerberized ftp client来自包krb5-workstation,所以我在一台RHEL 5.7上面验证了一下,如下所示,Kerberized ftp client确实来自包krb5-workstation
# more /etc/redhat-release Red Hat Enterprise Linux Server release 5.7 (Tikanga) # rpm -qf /usr/kerberos/bin/ftp krb5-workstation-1.6.1-62.el5
于是在这台服务器上安装了yum install krb5-workstation,但是安装过后依然找不到client命令
[ ~]# yum install krb5-workstation.x86_64 [ ~]# yum info installed | grep "krb5-workstation" Name : krb5-workstation Description : Kerberos is a network authentication system. The krb5-workstation [ ~]# yum list installed | grep "krb5-workstation" krb5-workstation.x86_64 1.15.1-46.el7 @base [ ~]# ll /usr/kerberos/bin/ftp ls: cannot access /usr/kerberos/bin/ftp: No such file or directory [ ~]# whereis ftp ftp: [ ~]# which ftp /usr/bin/which: no ftp in (/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
查了资料(如有不正确,敬请指正),似乎从CentOS 6/ RHEL 6开始, krb5-workstation中已经不包含Kerberized ftp client了,而是包含在krb5-appl-clients这个包中。
https://bugzilla.redhat.com/show_bug.cgi?id=600428
如下所示,安装完krb5-appl-clients就能看到/usr/kerberos/bin/ftp命令了。
[ ~]# yum install krb5-appl-clients
如果没有配置yum,那么可以从下面地址下载安装包。
https://centos.pkgs.org/6/centos-x86_64/krb5-appl-clients-1.0.1-7.el6_2.1.x86_64.rpm.html
另外,在解决这个问题的过程,查了不少资料,下面个资料介绍了不同Linux版本中ftp client来自那些包。是个不错的总结。
Many Linux and Unix systems have Kerberized FTP clients installed by default. You can also download and install the MIT Kerberos distribution, which includes this client. Depending on your system, it may be installed in different locations, for example:
· /usr/kerberos/bin/ftp on Red Hat and derivatives (from the krb5-workstation package 或krb5-appl-clients)
· /usr/bin/krb5-ftp on Debian and derivatives, such as Ubuntu (from the krb5-clients package)
· /usr/bin/kftp on Gentoo (from the mit-krb5 ebuild)
· /usr/lib/heimdal/bin/ftp on SuSE 9 (from the Heimdal package)
· /usr/lib/mit/bin/ftp on SuSE 10 (from the krb5-apps-clients package)
参考资料:
https://kb.iu.edu/d/auxi
https://centos.pkgs.org/6/centos-x86_64/krb5-appl-clients-1.0.1-7.el6_2.1.x86_64.rpm.html