手頭一臺Linux伺服器(Red Hat Enterprise Linux Server release 6.6),寫了一個shell腳本,在上面測試運行時,發現Kerberized ftp client命令不存在。註意這裡所說的是ftp命令,不是ftp工作站。 [root@KerryDB ~]# ... ...
手頭一臺Linux伺服器(Red Hat Enterprise Linux Server release 6.6),寫了一個shell腳本,在上面測試運行時,發現Kerberized ftp client命令不存在。註意這裡所說的是ftp命令,不是ftp工作站。
[root@KerryDB ~]# more /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6
[root@KerryDB ~]# ls /usr/kerberos/bin/ftp
ls: cannot access /usr/kerberos/bin/ftp: No such file or directory
[root@KerryDB ~]#
[root@KerryDB ~]# 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命令
[root@KerryDB ~]# yum install krb5-workstation.x86_64
[root@KerryDB ~]# yum info installed | grep "krb5-workstation"
Name : krb5-workstation
Description : Kerberos is a network authentication system. The krb5-workstation
[root@KerryDB ~]# yum list installed | grep "krb5-workstation"
krb5-workstation.x86_64 1.15.1-46.el7 @base
[root@KerryDB ~]# ll /usr/kerberos/bin/ftp
ls: cannot access /usr/kerberos/bin/ftp: No such file or directory
[root@KerryDB ~]# whereis ftp
ftp:
[root@KerryDB ~]# 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命令了。
[root@KerryDB ~]# 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