Chinaunix首页 | 论坛 | 博客
  • 博客访问: 285114
  • 博文数量: 84
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: -10
  • 用 户 组: 普通用户
  • 注册时间: 2016-07-05 09:11
文章分类
文章存档

2015年(1)

2014年(6)

2013年(8)

2012年(1)

2011年(6)

2010年(2)

2009年(16)

2008年(44)

我的朋友

分类: LINUX

2008-04-22 23:22:00

安装xinetd
[root@localhost local]# tar -zxvf xinetd-2.3.14.tar.gz
[root@localhost local]# cd xinetd-2.3.14
[root@localhost xinetd-2.3.14]# ./configure
[root@localhost xinetd-2.3.14]# make
[root@localhost xinetd-2.3.14]# make install
==========================================
 
配置xinetd
[root@localhost xinetd-2.3.14]# cp /etc/xinetd.conf /etc/xinetd.conf.bak
[root@localhost xinetd-2.3.14]# sed -e 's/etc/sbin/g' xinetd/sample.conf > /etc/xinetd.conf
添加运行级符号链接
[root@localhost xinetd-2.3.14]# chmod 754 /etc/rc.d/init.d/xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc0.d/K49xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc1.d/K49xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc2.d/K49xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc3.d/S23xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc4.d/S23xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc5.d/S23xinetd &&
ln -s  /etc/rc.d/init.d/xinetd /etc/rc.d/rc6.d/K49xinetd
========================================================
 
 
启动脚本运行xinetd
[root@localhost mnt]# /etc/rc.d/init.d/xinetd start
 惎鍔?xinetd锛?[60G[  纭?畾  ]
touch: cannot touch `/mnt/lockdev/xinetd': No such file or directory
============================================
创建该目录在次启动正常
[root@localhost mnt]# mkdir -p /mnt/lockdev
[root@localhost mnt]# /etc/rc.d/init.d/xinetd start
鍚?姩 xinetd锛?[root@localhost mnt]# netstat -antp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address               Foreign Address             State       PID/Program name  
tcp        0      0 0.0.0.0:32769               0.0.0.0:*                   LISTEN      1452/rpc.statd     
tcp        0      0 0.0.0.0:37                  0.0.0.0:*                   LISTEN      6300/xinetd        
tcp        0      0 0.0.0.0:7                   0.0.0.0:*                   LISTEN      6300/xinetd        
tcp        0      0 0.0.0.0:13                  0.0.0.0:*                   LISTEN      6300/xinetd
===================================================
配置命令解释
cp /etc/xinetd.conf /etc/xinetd.conf.bak : 保存当前的xinetd.conf文件。
sed -e 's/etc/sbin/g' xinetd/sample.config > /etc/xinetd.conf:确保所有的守护进程的路径是/usr/sbin而不是默认的/usr/etc。
ln -s /etc/rc.d/init.d/xinetd /etc/rc.d/rc3.d/S300xinetd, etc. :创建指向xinetd启动脚本的运行级链接,用于在机器启动和关闭时自动运行和停止xinetd。
 
内容
xinetd软件包中包含 xinetd, itox以及 xconv.pl。
具体说明
xinetd
xinetd是internet服务守护进程。
itox
itox是一个用于将inetd.conf文件转化为xinetd.conf格式的工具。
xconv.pl
与itox相似,xconv.pl是一个用于将inetd.conf文件转化为xinetd.conf格式的perl脚本。
阅读(8784) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~