|
服务器ip为:172.17.17.10
首先安装vsftpd:
[iyunv@localhost ~]# mount /dev/cdrom /mnt
mount: block device /dev/cdrom is write-protected, mounting read-only
[iyunv@localhost ~]# cd /etc/yum
yum/ yum.conf yum.repos.d/
[iyunv@localhost ~]# cd /etc/yum.repos.d/
[iyunv@localhost yum.repos.d]# ls
rhel-debuginfo.repo rhel-source.repo
[iyunv@localhost yum.repos.d]# cp rhel-source.repo server.repo
[iyunv@localhost yum.repos.d]#
[iyunv@localhost yum.repos.d]# ls
rhel-debuginfo.repo rhel-source.repo server.repo
[iyunv@localhost yum.repos.d]# vim server.repo
[iyunv@localhost yum.repos.d]# vim server.repo
[iyunv@localhost yum.repos.d]#
[iyunv@localhost yum.repos.d]# cd
[iyunv@localhost ~]#
[iyunv@localhost ~]# yum install vsftpd
修改配置文件:
[iyunv@localhost ~]# vim /etc/vsftpd/vsftpd.conf
local_enable=YES
write_enable=YES
创建本地用户:
[iyunv@localhost ~]# mkdir -p /var/ftp/pub/zwb
[iyunv@localhost ~]#
[iyunv@localhost ~]# useradd -G ftp -d /var/ftp/pub/zwb -M zwb
[iyunv@localhost ~]#
[iyunv@localhost ~]# passwd zwb
Changing password for user zwb.
New UNIX password:
BAD PASSWORD: it does not contain enough DIFFERENT characters
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
[iyunv@localhost ~]#
重启vsftpd服务:
[iyunv@localhost ~]# service vsftpd restart
关闭 vsftpd: [确定]
为 vsftpd 启动 vsftpd: [确定]
[iyunv@localhost ~]#
在客户端测试:
[iyunv@localhost ~]# ftp 172.17.17.10
Connected to 172.17.17.10.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (172.17.17.10:root): zwb
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
|
|