linux安装ftp

1、切换到root用户

2、查看vsftp服务状态:[root@ls ~]# systemctl status vsftpd

  Unit vsftpd.service could not be found.

可以发现服务器没有vsftpd服务,那么先安装vsftpd服务:

3、安装ftp:[root@ls ~]# yum install -y vsftpd

4、启动ftp:[root@ls ~]# systemctl start vsftpd

5、将21端口插入到INPUT的ACCEPT中:[root@ls ~]# iptables -I INPUT 5 -p tcp --dport 21 -j ACCEPT

  查看:[root@ls ~]# iptables -nL --line-numbers | grep 21

6、搭建FTP服务,加载ip_conntrack_ftp,完成搭建

7、[root@ls ~]# modprobe ip_conntrack_ftp

8、设置开机启动:[root@ls ~]# chkconfig vsftpd on

posted @ 2022-05-09 10:54  闫超辉  阅读(1614)  评论(0编辑  收藏  举报