在CentOS系统中,要让FTP服务器(如vsftpd)在系统启动时自动运行,您需要使用systemd来管理该服务。以下是设置vsftpd服务自动启动的步骤:
sudo yum install vsftpd
sudo systemctl start vsftpd
sudo systemctl enable vsftpd
现在,每次系统启动时,vsftpd服务都会自动运行。
如果您使用的是其他FTP服务器,例如ProFTPD,步骤类似。首先确保已经安装了ProFTPD,然后使用以下命令启动和设置开机自启动:
sudo yum install proftpd
sudo systemctl start proftpd
sudo systemctl enable proftpd
这样,无论是vsftpd还是ProFTPD,它们都将在CentOS系统启动时自动运行。