分类: LINUX
2012-02-14 17:27:44
Q. How do I configure and install an FTP server in CentOS / RHEL 5 / Fedora Linux server?
A. CentOS / RHEL server comes with vsftpd which is the Very Secure File Transfer Protocol (FTP) daemon. The server can be launched via a xinetd or as standalone mode, in which case vsftpd itself will listen on the network port 21.
Simply type the following command as a superuser (root):
# yum install vsftpd
Type the following command:
# chkconfig vsftpd on
Type the following command:
# service vsftpd start
Type the following command:
# service vsftpd stop
Type the following command:
# service vsftpd restart
Open /etc/sysconfig/iptables file, enter:
# vi /etc/sysconfig/iptables
Append following line to open ftp port 21 before REJECT line:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 21 -j ACCEPT
Save and close the file. Restart the firewall:
# service iptables start
Type the following command:
$ ftp localhost
$ ftp ftp.server.com
$ ftp 202.54.1.1
The default configuration file is /etc/vsftpd/vsftpd.conf file. You can open file with vi text editor:
# vi /etc/vsftpd/vsftpd.conf
1、修改/etc/vsftpd/vsftpd.conf
将底下三行
改为
See see vsftpd.conf man pages for all configuration options.
$ man vsftpd.conf