在Ubuntu上启动FTPServer,你可以按照以下步骤操作:
安装FileZilla Server 打开终端并运行以下命令来安装FileZilla Server:
sudo apt update
sudo apt install filezilla-server
配置FileZilla Server
sudo systemctl start filezilla-server
来启动服务。sudo systemctl enable filezilla-server
设置开机自启。访问FileZilla Server管理界面
http://your_server_ip:8080
(将your_server_ip
替换为你的服务器IP地址)。admin
和密码filezilla
登录。配置FTP和FTPS
重启FileZilla Server
sudo systemctl restart filezilla-server
来应用更改。安装vsftpd
sudo apt update
sudo apt install vsftpd
生成SSL证书
sudo mkdir /etc/ssl/private
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/vsftpd.pem -out /etc/ssl/private/vsftpd.pem
配置vsftpd
sudo nano /etc/vsftpd.conf
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=NO
ssl_sslv3=NO
rsa_cert_file=/etc/ssl/private/vsftpd.pem
rsa_private_key_file=/etc/ssl/private/vsftpd.pem
重启vsftpd服务
sudo systemctl restart vsftpd
配置防火墙 如果你使用的是UFW防火墙,允许FTP流量:
sudo ufw allow 21/tcp
sudo ufw allow 990/tcp # FTPS数据连接端口
sudo ufw reload
测试FTPS连接 使用FTP客户端(如FileZilla)连接到你的服务器,选择FTPS模式,并使用生成的证书进行身份验证。
通过以上步骤,你应该能够在Ubuntu上成功启动并配置一个FTPServer。
亿速云「云数据库 MySQL」免部署即开即用,比自行安装部署数据库高出1倍以上的性能,双节点冗余防止单节点故障,数据自动定期备份随时恢复。点击查看>>