Linux安装和配置ftp

1检测系统是否已安装 vsftpd

# rpm -q vsftpd

2安装 vsftpd:

# yum -y install vsftpd

3 查看 vsftpd 安装位置:

# whereis vsftpd

4.查看ftp 服务器状态

#service vsftpd status

5启动ftp服务器

#service vsftpd start 或者 systemctl start vsftpd.service

6重启ftp服务器

#service vsftpd restart

7设置开机自启:

# systemctl enable vsftpd.service

或者 chkconfig vsftpd on

8设置开机不自启

chkconfig vsftpd off

9防火墙设置

9.1查看防火墙状态:

# systemctl status firewalld.service

扫描二维码关注公众号,回复: 11132338 查看本文章

9.2开启防火墙:

# systemctl start firewalld.service

9.3关闭防火墙:

# systemctl stop firewalld.service

9.4 重启防火墙

# systemctl restart firewalld.service

9.5 禁止开机启动

# systemctl disable firewalld.service

9.6 开启开机启动

# systemctl enable firewalld.service

说明:如果你不愿意关闭防火墙,需要防火墙添加FTP服务。

   firewall-cmd --permanent --zone=public --add-service=ftp

   firewall-cmd --reload

10. 查看服务有没有启动

#netstat -an | grep 21

11.配置文件

11.1 ftpusers 指定了哪些用户账户不能访问FTP服务器

11.2 user_list 该文件里的用户账户在默认情况下也不能访问FTP服务器,仅当vsftpd .conf配置文件里启用userlist_enable=NO选项时才允许访问。

11.3 vsftpd.conf 来自定义用户登录控制、用户权限控制、超时设置、服务器功能选项、服务器性能选项、服务器响应消息等FTP服务器的配置

12 连接客户端:FlashFXP

12.1 关闭本地防火墙或者允许防火墙进行文件传输

发布了52 篇原创文章 · 获赞 54 · 访问量 21万+

猜你喜欢

转载自blog.csdn.net/weixin_37909391/article/details/83745447
今日推荐