用户如何设置在linux系统开机自动启动某个网络服务?2,什么是xinetd

用户如何设置在linux系统开机自动启动某个网络服务?2,什么是xinetd,第1张

chkconfig xxx on #其中xxx为服务名
xinetd 即eXtended Internet daemon,xinetd是新一代的网络守护进程服务程序,又叫超级Internet服务器

不确定你用的什么模式,我在自己的系统上测试了一下。
1standalone 模式:
11yast xinetd 里off vsftpd
111 /etc/vsftpdconf 里设置listen_ipv6=YES 注释掉listen=YES
FTP工作正常
/etc/initd/vsftpd restart done
112 /etc/vsftpdconf 里注释掉listen_ipv6=YES 设置listen=YES
# /etc/initd/vsftpd restart done
ftp正常
113 /etc/vsftpdconf 里设置isten_ipv6=YES 设置listen=YES
# /etc/initd/vsftpd restart
exit status of parent of /usr/sbin/vsftpd: 1 failed
ftp 无法连接 原因应为conf里写的 “ run two copies with two conf files”
114/etc/vsftpdconf 里注释掉isten_ipv6=YES 注释掉listen=YES
# /etc/initd/vsftpd restart
exit status of parent of /usr/sbin/vsftpd: 1 failed
ftp 无法连接
115 根据 以下文档 不做测试 文档见
/usr/share/doc/packages/vsftpd/READMESUSE

”Starting with 101 vsftpd can be configured standalone
or over the xinetd superdeamon Default is standalone
If you want to run it over xinetd make sure the you enable
the service in the xinetd configuration (/etc/xinetdd/vsftp)
and set the following line in /etc/vsftpdconf
listen=NO
This is needed for vsftpd to over xinetd“
2xinetd 模式
21 yast xinetd 里 on vsftpd
/etc/vsftpd,conf 注释掉listen_ipv6=YES 设置listen=NO
#service xinetd restart
ftp 工作正常
# /etc/initd/vsftpd restart
exit status of parent of /usr/sbin/vsftpd: 1 failed
22 yast xinetd 里 off vsftpd
/etc/vsftpd,conf 注释掉listen_ipv6=YES 设置listen=NO
#service xinetd restart
ftp无法连接
# /etc/initd/vsftpd restart
exit status of parent of /usr/sbin/vsftpd: 1 failed

Linux系统中的进程分为:独立守护进程和被动守护进程。
独立守护进程由相应的独立启动,而被动守护进程由Xinetd服务监听启动。
例如:邮件服务器配置守护进程sendmail就是独立守护进程,可以用service命令启动,而pop3协议就以被动守护进程方式启动,需要修改/etc/xinetdd目录下的相应守护进程文件ipop3,再重新启动xinetd的方式启动。
查看进程可以用:ps
列出当前所有的后台进程
删除进程则用kill命令。kill命令的语法格式很简单,大致有以下两种方式:
kill
[-s
信号
|
-p
]
[
-a
]
进程号

kill
-l
[信号]
-s
指定需要送出的信号。既可以是信号名也可以对应数字。
-p
指定kill命令只是显示进程的pid,并不真正送出结束信号。
-l
显示信号名称列表,这也可以在/usr/include/linux/signalh文件中找到。
一般用法:
ps列出当前所有的后台进程
kill
PID。某个进程已经挂死或闲置,使用kill命令却杀不掉,则必须必须发送信号9,强行关闭此进程。


欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/13365763.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-07-22
下一篇 2023-07-22

发表评论

登录后才能评论

评论列表(0条)

保存