您好,登錄后才能下訂單哦!
1.安裝 xinetd
yum -y install xinetd
2. 安裝rsh
注:以下安裝的rsh-server、rsh、rstatd包如果不能通過wget下載,可以在51cto下載中心下載,地址如下:
http://down.51cto.com/data/1322433
從如下地址去下載
wget ftp://ftp.muug.mb.ca/mirror/redhat/redhat/linux/9/en/os/i386/RedHat/RPMS/rsh-server-0.17-14.i386.rpm
安裝rsh服務器rpm包
rpm -ivh rsh-server-0.17-14.i386.rpm --force --nodeps
下載rsh客戶端rpm包
wget ftp://ftp.muug.mb.ca/mirror/redhat/redhat/linux/9/en/os/i386/RedHat/RPMS/rsh-0.17-14.i386.rpm
安裝rsh客戶端rpm包
rpm -ivh rsh-0.17-14.i386.rpm --force --nodeps
3. 安裝 rstatd
第1種方式安裝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 ---安裝
第2種方式安裝rstatd
yum install rusers-server
運行如下方式來查看是否已經將 rusers-server 裝上了(如妹結果還需)
yum search rusers-server
通過 rpcinfo -p 來查看是否已經有 rstatd 服務啟動了啟動的結果如下所示:
[root@locathost init.d]# rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 37276 status
100024 1 tcp 51722 status
100001 3 udp 991 rstatd
100001 2 udp 991 rstatd
100001 1 udp 991 rstatd
100011 1 udp 875 rquotad
100011 2 udp 875 rquotad
100011 1 tcp 875 rquotad
100011 2 tcp 875 rquotad
如果沒有,那么到init.d下啟動,命令如下
/etc/init.d/./rstatd start
命令擴展啟動 (./rstatd {start|stop|status|rstart})
4. 配置 xinetd.conf
vi /etc/xinetd.conf
#
# This is the master xinetd configuration file. Settings in the
# default section will be inherited by all service configurations
# unless explicitly overridden in the service configuration. See
# xinetd.conf in the man pages for a more detailed explanation of
# these attributes.
defaults
{
# The next two items are intended to be a quick access place to
# temporarily enable or disable services.
#
#enabled=
#disabled=
# Define general logging characteristics.
log_type= SYSLOG daemon info
log_on_failure= HOST
log_on_success= PID HOST DURATION EXIT
# Define access restriction defaults
#
#no_access=
#only_from=
#max_load= 0
cps= 50 10
#instances= 50
#per_source= 10
instances= 30
per_source= 50 10
# Address and networking defaults
#
#bind=
5. 分別修改/etc/xinetd.d/下的三個conf文件
rlogin ,rsh,rexec 這三個配置文件,
將這三個文件里面的Disable = yes都改成 Disable = no
或是把# default: off都設置成 on ,并把“#”去掉,這個的意思就是在xinetd啟動的時候默認都啟動上面的三個服務!
例如rlogin的內容
如下標紅的地方修改一處即可
# default: on
# description: rlogind is the server for the rlogin(1) program. The server \
#provides a remote login facility with authentication based on \
#privileged port numbers from trusted hosts.
service login
{
socket_type= stream
wait= no
user= root
log_on_success+= USERID
log_on_failure += USERID
server= /usr/sbin/in.rlogind
#disable= yes
disable = no
}
6. 啟動 xinetd
service xinetd start
確認啟動
netstat -an |grep 514
結果:
Java代碼
1.tcp 0 0 0.0.0.0:514 0.0.0.0:* LISTEN
7. 啟動 rstatd
rpc.rstatd
rpc.rquotad
8.確認啟動:
rpcinfo -p
結果:
[root@locathost init.d]# rpcinfo -p
program vers proto port service
100000 4 tcp 111 portmapper
100000 3 tcp 111 portmapper
100000 2 tcp 111 portmapper
100000 4 udp 111 portmapper
100000 3 udp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 37276 status
100024 1 tcp 51722 status
100001 3 udp 991 rstatd
100001 2 udp 991 rstatd
100001 1 udp 991 rstatd
100011 1 udp 875 rquotad
100011 2 udp 875 rquotad
100011 1 tcp 875 rquotad
100011 2 tcp 875 rquotad
9. 關閉防火墻服務
service iptables stop
配置loadrunner unix監控輸入服務器ip即可 如下圖:
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。