setup ftp server on centos 7

useful commands

参考:

root 登录

install vsftpd

离线下载/上传

思路参考

libcurl man

give up NAT & 语音

以后用安卓

service vsftpd restart # 启动ftp.

cd /etc/vsftpd

in ftpusers & user_list 注释掉root

iptables -I INPUT -p tcp –dport 21 -j ACCEPT

配置selinux

getsebool -a | grepftp

setsebool -P ftpd_full_access on

in vsftpd.conf chroot_local_user=YES # 是否限定用户在其主目录下(NO 表示允许切换到上级目录)

service httpd start # 启动 apache

允许 ftp 服务

irewall-cmd –permanent –zone=public –add-service=ftp

重新载入配置

firewall-cmd –reload

firewall-cmd –list-ports # check

firewall-cmd –zone=public –add-port=21/tcp –permanent

systemctl status firewalld

在 CentOS 上安装 -lcurl(libcurl) 库

go 官网 and download the newest curl-x.xx.x.tar.bz2 by IDM with proxy, extract it in windows and use ssh protocol

1
scp C:\Users\magic\Desktop\server4.c [email protected]:/root/try1/

to transfer it to my VPS, go into the directory and make, then make install.

其它实现过程、测试结果

Word 文档

代码

server client