Linux(CentOS)安装vsftpd过程
最近在百度云开了6个月的服务器,拿来练练手,首选就是需要上传项目
- 查看是否安装 vsftpd
rpm -qa|grep vsftpd
- 安装vsftpd
yum -y install vsftpd
3.vsftpd配置。该增加的增加,该打开的打开
vim /etc/vsftpd/vsftpd.conf
anonymous_enable=NO
local_enable=YES
write_enable=YES
local_umask=022
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
xferlog_std_format=YES
chroot_list_enable=YES
chroot_list_file=/etc/vsftpd/chroot_list
listen=YES
//ipv6设置为no
listen_ipv6=NO
local_root=/ftpfile
anon_root=/ftpfile
pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
- 启动
service vsftpd restart
- 设置iptables 防火墙
vim /etc/sysconfig/iptables-config
增加
IPTABLES_MODULES="ip_nat_ftp ip_conntrack_ftp"
新增21端口
vim /etc/sysconfig/iptables
iptables -A INPUT -p tcp --dport 21 -m stata --stateNEW,ESTABLISHED -j ACCEPT
- 重启防火墙
service iptables restart