在CentOS系统上安装和使用FileZilla的步骤如下:
sudo yum install epel-release -y
sudo yum update -y
sudo yum install filezilla -y
安装完成后,可以通过以下命令启动FileZilla:
filezilla
sudo yum groupinstall "Development Tools" -y
sudo yum install wget libxml2-devel net-snmp-devel pcre-devel zlib-devel -y
wget https://ftp.filezilla-project.org/pub/filezilla/download/v3.52.0/filezilla-server_3.52.0_linux-x86_64.tar.gz
tar -zxvf filezilla-server_3.52.0_linux-x86_64.tar.gz
cd filezilla-server_3.52.0_linux-x86_64
./configure
make
sudo make install
/usr/local/bin/FileZilla_Server
sudo nano /etc/systemd/system/filezilla-server.service
添加以下内容:[Unit]
Description=FileZilla Server
After=network.target
[Service]
ExecStart=/usr/local/bin/FileZilla_Server
Restart=always
User=nobody
Group=nogroup
[Install]
WantedBy=multi-user.target
然后启用并启动服务:sudo systemctl daemon-reload
sudo systemctl enable filezilla-server
sudo systemctl start filezilla-server
sudo useradd -m -d /home/sftpuser -s /bin/bash sftpuser
sudo passwd sftpuser
sudo mkdir /home/sftpuser/sftpdir
sudo chown sftpuser:sftpuser /home/sftpuser/sftpdir
sudo chmod 755 /home/sftpuser/sftpdir
Subsystem sftp /usr/libexec/openssh/sftp-server
Match Group sftp
XForwardedFiles none
ChrootDirectory /home/sftpuser/sftpdir
AllowTcpForwarding no
X11Forwarding no
ForceCommand internal-sftp
sudo systemctl restart sshd
通过以上步骤,您可以在CentOS系统上成功安装、配置并使用FileZilla进行文件传输。