配置超级守护进程启动vsftp
需要装xinetd服务管理工具:
[root@redhat6-3 ~]# rpm -ivh xinetd-2.3.14-33.el6.i686.rpm
[root@redhat6-3 ~]# cp -rf /usr/share/doc/vsftpd-2.2.2/vsftpd.xinetd /etc/xinetd.d/vsftpd
[root@redhat6-3 ~]# vi /etc/xinetd.d/vsftpd
# default: off
# description: The vsftpd FTP server serves FTP connections. It uses \
# normal, unencrypted usernames and passwords for authentication.
service ftp
{
socket_type = stream
wait = no
user = root
server = /usr/sbin/vsftpd
server_args = /etc/vsftpd/vsftpd.conf
nice = 10
disable = no //将yes改为no即可
flags = IPv4
}
修改配置文件
#listen=YES
将listen注释掉即可
建议write_enable=YES改为NO
将vsftpd的服务停掉:
[root@redhat6-3 xinetd.d]# service vsftpd stop
Shutting down vsftpd: [ OK ]
重启xinted服务:
[root@redhat6-3 etc]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
查看端口是否存在:
[root@redhat6-3 etc]# netstat -antp | grep 21
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN 1221/rpcbind
tcp 0 0 0.0.0.0:21 0.0.0.0:* LISTEN 4369/xinetd
tcp 0 0 :::111 :::* LISTEN 1221/rpcbind
因为启用超级进程来管理vsftp,所以这时候启动vsftpd会报如下错误:
[root@redhat6-3 etc]# service vsftpd start
Starting vsftpd for vsftpd: 500 OOPS: vsftpd: not configured for standalone, must be started from inetd
若不想启用超级进程管理,将配置文件中的listen=YES注释取消即可
测试端登入测试:
[root@redhat6-2 ~]# ftp 192.168.16.13
Connected to 192.168.16.13 (192.168.16.13).
220 Welcome to connect my FTP!
Name (192.168.16.13:root): linuxidc
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> bye
221 Goodbye.
windows登入测试:
同上次方法一样打开我的电脑或cmd(调用浏览器)输入:tp://linuxidc@192.168.16.13/
输入用户名和密码后登入进行操作即可
简单的ftp服务器配置完成!
CentOS 7 搭建ftp服务器
Ubuntu实用简单的FTP架设