centos开启ftp服务的步骤

时间:2023-03-08 22:48:59

1、安装vsftpd

sudo yum install vsftpd -y

2、启动ftp服务

service vsftpd start

3、  加入开机启动

chkconfig vsftpd on

netstat -nltp | grep 21  可以查看系统监听21端口

4、更改配置

进入 vi /etc/vsftpd/vsftp.conf 编辑

# 禁用匿名用户

anonymous_enable=NO

5、重启ftp服务

service vsftpd restart

6、关闭防火墙

systemctl stop firewalld.service #停止firewall

systemctl disable firewalld.service #禁止firewall开机启动

7、

 修改/etc/selinux/config 文件

 将SELINUX=enforcing改为SELINUX=disabled 

 必须!否则,查看不到所有ftp上面的目录

8、重启虚拟机

  完毕!