Linux(CentOS)安裝vsftpd過程
最近在百度雲開了6個月的伺服器,拿來練練手,首選就是需要上傳項目
- 檢視是否安裝 vsftpd
rpm -qa|grep vsftpd
- 安裝vsftpd
3.vsftpd配置。該增加的增加,該打開的打開yum -y install 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