Redhat安装ftp及vsftpd

操作系统:Red Hat Enterprise Linux Server release 6.4 (Santiago)

问题:使用柜面的上传文件功能时,提示Connection refused
查看是否安装 ftp
$ rpm -qa | grep ftp

结果:gvfs-obexftp-1.4.3-15.el6.x86_64 ,只装了obexftp,跟另一台服务器不一致,需要安装vsftpd。

使用yum命令在线安装:
$ yum install vsftpd
提示:No more mirrors to try

清理缓存:
$ yum clean all
$ yum makecache

清理缓存后还是报错:
Loaded plugins: product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
file:///iso/repodata/repomd.xml: [Errno 14] Could not open/read file:///iso/repodata/repomd.xml
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-source. Please verify its path and try again

泥煤,这么麻烦,不在线安装了,下载ftp-0.17-51.1.el6.x86_64.rpm(64位),上传到服务器,用命令安装:
$ rpm -ivh ftp-0.17-51.1.el6.x86_64.rpm

再安装 vsftpd-3.0.2-1.el5.x86_64.rpm(64位)
$ rpm -ivh vsftpd-3.0.2-1.el5.x86_64.rpm

启动服务
$ service vsftpd start

测试ftp连接:
$ ftp 10.10.1.12
提示:This FTP server is anonymous only

需要修改配置文件,参数太多太复杂了,懒得改了,直接备份一个,把另一台服务器的内容copy过来
/etc/vsftpd/vsftpd.conf

重启服务
$ service vsftpd restart

OK,文件传上去了。随便写写,接着干活……