程序人生

撰写生活代码,等待编译美好人生
随笔 - 48, 文章 - 0, 评论 - 29, 引用 - 0
数据加载中……

配置xinetd

今天打算把所有得网络服务都用xinetd来启动。找了几篇文章看了看。很快FTP,CVS,SSH都搞定了,然后配置Postgresql。死活起不来。于是去找xinetd的官方文档,这才发现原来很多的文章都没有很详细地说明type这个参数得作用。我误以为象ssh那样省去Type也没有问题。下面是官方文档对type得说明:
xinetd can manage 3 types of services :
  1. RPC : for those defined in the /etc/rpc file...; but doesn't work very well;
  2. INTERNAL : for services directly managed by xinetd (echo, time, daytime, chargen and discard) ;
  3. UNLISTED : for services not defined either in the /etc/rpc file, or in the /etc/services file ;
Let's note it's possible to combine various values, as we'll see with servers, services and xadmin internal services.

按我得理解翻译:
xinetd 可以管理3类服务:
  1. RPC:定义在/etc/rpc文件里得服务;(xinetd对这类服务得管理并不是十分的理想)
  2. INTERNAL:由xinetd直接管理的服务(echo, time, daytime, chargen 和 discard);
  3. UNLISTED:既没有在/etc/rpc 也没有在/etc/services中定义得服务。
我查看了/etc/rpc 和 /etc/services 里面并没有定义postgresql服务。所以应该使用
type = UNLISTED
修改配置之后重启xinetd,posgresql启动成功。

我的posgresql服务配置如下:

service postgressql 
{
  socket_type   
= stream
  type               
= UNLISTED
  port               
= 5432 
  server            
= /etc/rc.d/postgresql
  server_args   
= start
  instances       
= 5
  protocol        
= tcp
  wait               
= no
  user               
= root
}

posted on 2007-02-15 16:52 405 Studio 阅读(712) 评论(0)  编辑  收藏 所属分类: LINUX


只有注册用户登录后才能发表评论。


网站导航: