yum -y install xinetd
2. 安装rsh
wget ftp://ftp.muug.mb.ca/mirror/redhat/redhat/linux/9/en/os/i386/RedHat/RPMS/rsh-server-0.17-14.i386.rpm
rpm -ivh rsh-server-0.17-14.i386.rpm --force --nodeps
wget ftp://ftp.muug.mb.ca/mirror/redhat/redhat/linux/9/en/os/i386/RedHat/RPMS/rsh-0.17-14.i386.rpm
rpm -ivh rsh-0.17-14.i386.rpm --force --nodeps
3. 安装 rstatd
wget http://nchc.dl.sourceforge.net/project/rstatd/rstatd/4.0.1/rpc.rstatd-4.0.1.tar.gz
# tar –xzvf rpc.rstatd-4.0.1.tar.gz
# ./configure ---配置
# make ---编译
# make install ---安装
4. 配置 xinetd.conf
vi /etc/xinetd.conf
# # xinetd.conf # # Copyright (c) 1998-2001 SuSE GmbH Nuernberg, Germany. # Copyright (c) 2002 SuSE Linux AG, Nuernberg, Germany. # defaults { log_type = FILE /var/log/xinetd.log log_on_success = HOST EXIT DURATION log_on_failure = HOST ATTEMPT # only_from = localhost instances = 30 cps = 50 10 # # The specification of an interface is interesting, if we are on a firewall. # For example, if you only want to provide services from an internal # network interface, you may specify your internal interfaces IP-Address. # # interface = 127.0.0.1 } includedir /etc/xinetd.d
5. 修改/etc/xinetd.d/下的三个conf文件
rlogin ,rsh,rexec 这三个配置文件,
打这三个文件,将里面的disable = yes都改成 disable = no ( disabled 用在默认的 {} 中 禁止服务)
或是把# default: off都设置成 on ,并把“#”去掉,这个的意思就是在xinetd启动的时候默认都启动上面的三个服务!
6. 启动 xinetd
service xinetd start
确认启动
netstat -an |grep 514
结果:
tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN
7. 启动 rstatd
rpc.rstatd rpc.rquotad
确认启动:
rpcinfo -p
结果:
程序 版本 协议 端口 100000 2 tcp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 727 status 100024 1 tcp 730 status 100011 1 udp 711 rquotad 100011 2 udp 711 rquotad 100011 1 tcp 714 rquotad 100011 2 tcp 714 rquotad 100001 5 udp 716 rstatd 100001 3 udp 716 rstatd 100001 2 udp 716 rstatd 100001 1 udp 716 rstatd
8. 关闭防火墙服务
service iptables stop
1) 重启后生效
开启: chkconfig iptables on 关闭: chkconfig iptables off
2) 即时生效,重启后失效
开启: service iptables start 关闭: service iptables stop
需要说明的是对于Linux下的其它服务都可以用以上命令执行开启和关闭操作。
在开启了防火墙时,做如下设置,开启相关端口,
修改/etc/sysconfig/iptables 文件,添加以下内容:
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
9.配置loadrunner unix监控输入服务器ip即可
参考地址:
http://www.51testing.com/?uid-49159-action-viewspace-itemid-91088
http://www.51testing.com/?uid-140390-action-viewspace-itemid-235080