linux rsh

1:安装前准备:

机器A:192.168.0.4 (安装rsh server)
机器B:192.168.0.10 (rsh client 调用执行192.168.0.4的命令)
2:
首先确认机器A是否安装rsh:
[root@mg04 root]# rpm -aq |grep rsh
rsh-0.17-14
rsh-server-0.17-14
如果没有安装以上两个包,请找到相关软件安装(如果是LINUX,可以从安装碟中找到)
安装包:
rpm -ivh rsh-0.17-5 (linux
操作系统)
rpm -ivh rsh-server-0.17-5 (linux
操作系统)
3:
确认是否启动rsh 服务:

使用命令setup,查看service是否将

rsh 加上*,如果加上*表示可以启动。
/etc/rc.d/init.d/xinetd restart 或者 service xinetd restart

检查是否启动: rsh server 监听和TCP 514
[root@mg04 root]#
netstat -an |grep 514
tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN
如果能看到514在监听说明服务器已经启动。
4:
配置rsh server:
修改/etc/securetty文件: echo rsh >>/etc/securetty hosts.equiv?)
如果打算用root作为rsh用户的话:
先用root登录到机器A中进行以下操作:
cd ~/
echo "192.168.0.10 root" >>.rhosts
允许192.168.0.10 root访问
echo "192.168.0.4 root" >>.rhosts
重启rsh server.
5:测试和注意的问题:
登录到b机器进行测试: rsh -l root 192.168.0.204 ps -ef
看是否能看到结果。如果看到
[root@mg04 etc]# rsh -l root 192.168.0.204 ps -ef
Permission denied.
这是由于权权限问题,一般是由于 .rhosts没有配置正确。.rhosts一般位于
rsh server
服务器相对应账号目录下比如root(.bash_profile在同一目录)
rsh
在执行命令有时会找不到。rsh 在调用命令是最好使用绝对路径。默认搜索路径为:
[root@mg04 etc]# rsh -l root 192.168.0.4 env |grep PATH
PATH=/usr/bin:/bin

LoadRunner监控Linux rstat协议允许网络上的用户获得同一网络上各机器的性能参数。 需要下载3个包: (1)rsh-0.17-14.i386.rpm (2)rsh-server-0.17-14.i386.rpm (3)rpc.rstatd-4.0.1.tar.gz 一、安装rsh 查看是否安装并卸载rsh [root@localhost /]# rpm –qa |grep rsh      --查看是否安装rsh [root@localhost /]# rpm –e + 版本号   --卸载该版本 安装rsh,rsh-server [root@localhost /]# rpm –ivh rsh-0.17-14.i386.rpm [root@localhost /]# rpm –ivh rsh-server-0.17-14.i386.rpm 二、安装rstatd 下载并安装rstatd,下载地址:http://sourceforge.net/projects/rstatd,上传至/usr/local 查看是否安装,一般来说Linux都没有安装 [root@localhost /]# find / -name rpc.rstatd 安装rstatd [root@localhost /]# tar -xzvf rpc.rstatd-4.0.1.tar.gz [root@localhost /]# cd rpc.rstatd-4.0.1 [root@localhost /]# ./configure [root@localhost /]# make [root@localhost /]# make install 三、安装完成后配置rstatd目标守护进程xinetd,配置文件于/etc/xinet.d目录下 修改/etc/xinetd.d目录下面的3个conf(rogin,rsh,rexec)中的disable均设置为no [root@localhost /]# cd /etc/xinetd.d      --进入到/etc/xinetd.conf目录中 [root@localhost /]# vi rlogin     --编辑disable=no,保存 [root@localhost /]# vi rsh  --编辑disable=no,保存 [root@localhost /]# vi rexec --编辑disable=no,保存 四、启动rpc.rstatd [root@localhost /]# rpc.rstatd --启动rpc.rstatd进程 [root@localhost /]# rpcinfo -p --执行此命令检查rpc服务的状态 如果未出现上图的rstatd说明没有安装成功,需要重复以上步骤。 到这里为止,LR监控Linux必要的服务都已安装好了。 五、关闭防火墙 [root@localhost /]# service iptables stop 六、利用LR中的Controller监控Linux资源 在Controller中,将System Resource Graphs中的Unix resources拖到右侧的资源监控区域。 鼠标右键选择Add Measurements,添加被监控Linux的IP地址x.x.x.x,选择需要监控的性能指标,确认。 七、遇到的问题 1. LoadRunner监控Linux资源时弹出如下错误: Monitor name :UNIX Resources. Cannot initialize the monitoring on 192.168.52.189. Error while creating the RPC client. Ensure that the machine can be connected and that it runs the rstat daemon (use rpcinfo utility for this
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值