1. 查看系统环境

[root@rsync_server ~]# cat /etc/redhat-release 

CentOS release 6.9 (Final)

[root@rsync_server ~]# uname -a

Linux web01 2.6.32-696.el6.x86_64 #1 SMP Tue Mar 21 19:29:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

2.关闭selinux和防火墙

[root@rsync_server ~]# /etc/init.d/iptables stop

[root@rsync_server ~]# cat /etc/selinux/config 

# This file controls the state of SELinux on the system.

# SELINUX=disabled

#     enforcing - SELinux security policy is enforced.

#     permissive - SELinux prints warnings instead of enforcing.

#     disabled - No SELinux policy is loaded.

SELINUX=disabled

# SELINUXTYPE= can take one of these two values:

#     targeted - Targeted processes are protected,

#     mls - Multi Level Security protection.

SELINUXTYPE=targeted 

3.安装vsftp服务

[root@rsync_server~]# yum list vsftpd

Loaded plugins: fastestmirror, security

Loading mirror speeds from cachedhostfile

 * base: mirrors.aliyun.com

 * epel: mirrors.aliyun.com

 * extras: mirrors.aliyun.com

 * updates: mirrors.aliyun.com

base                                                    | 3.7 kB     00:00    

epel                                                    | 4.3 kB     00:00    

extras                                                  | 3.4 kB     00:00    

updates                                                 | 3.4 kB     00:00    

Installed Packages

vsftpd.x86_64                         2.2.2-24.el6                         @base

[root@rsync_server~]# yum install vsftpd.x86_64

4.  备份vsftp的配置文件

[root@rsync_server~]# cd /etc/vsftpd/

[root@rsync_servervsftpd]# ls

chroot_list  user_list   vsftpd.bak  vsftpd_conf_migrate.sh

ftpusers     vftpuser.db  vsftpd.conf

[root@rsync_servervsftpd]# cp vsftpd.conf vsftpd.conf.bak

5. 编辑配置文件

vim /etc/vsftpd/vsftpd.conf

anonymous_enable=NO #将这个的YES改为NO

userlist_deny=NO  #在末尾加上这一句

6.创建认证账号

[root@rsync_servervsftpd]# useradd test-bai

[root@rsync_servervsftpd]# echo "123456"|passwd --stdin test-bai

Changing password for user test-bai.

passwd: all authentication tokensupdated successfully.

7.添加用户到user_list中

[root@rsync_servervsftpd]#  echo test-bai >>/etc/vsftpd/user_list

8.启动vsftp服务

[root@rsync_server vsftpd]# /etc/init.d/vsftpd start

Starting vsftpd for vsftpd:                                [  OK  ]

9.连接vsftp

Centos6.9如何安装vsftp_安装

10.传输文件

Centos6.9如何安装vsftp_配置_02