我正在使用GNU的Inetutils FTP,并已将其全部设置,但它不会自动启动,当我打开我的系统。为了使其正常工作,我必须使用"ftpd -D“启动独立操作。我已经知道我已经在运行xinetd了,我相信我需要使用它来自动启动守护进程。
在/etc/xinetd.d/目录中,我添加了一个名为“ftp”的文件。其内容包括:
service ftpd
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/ftpd
instances = 20
}* whereis显示ftpd驻留在/usr/bin/ftpd*中。
添加之后,我重新加载配置并重新启动服务器。
/etc/init.d/xinetd reload
/etc/init.d/xinetd restart我的xinetd.conf文件如下:
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
defaults
{
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
includedir /etc/xinetd.d我的系统中也有一个inetd.config文件,所以我添加了下面的内容,以获得良好的效果,尽管inetd似乎没有运行。
ftp stream tcp nowait root /usr/bin/ftpd in.ftpd -l -a当我试图连接到ftp服务器时,我会得到错误"ECONNREFUSED连接被服务器拒绝“。有人知道为什么xinetd不自动启动吗?
我从以下网站获得了我的信息:http://www.cyberciti.biz/faq/linux-how-do-i-configure-xinetd-service/
发布于 2015-06-03 18:14:04
我想通了。如果将来有其他人出现这个问题,我忘记为服务指定要使用的端口,将服务名称更改为ftp,并将禁用设置为no。这是我的最后服务文件:
service ftp
{
port = 21
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/ftpd
instances = 20
}为了使日志记录正常工作,我使用了以下命令:
/usr/sbin/xinetd -filelog /var/log/xinetd -f /etc/xinetd.conf发布于 2016-11-07 13:22:20
=>您可以看到c:/services文件上的服务名称,请检查
{
port = 21
disable = no
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/bin/ftpd
instances = 20
}https://unix.stackexchange.com/questions/207348
复制相似问题