王飞鹏
作者王飞鹏·2012-12-09 22:07
信息分析/架构师·IBM

为DB2 DPF环境配置RSH

字数 6605阅读 2056评论 0赞 0

DB2 DPF各分区之间通讯可以采用RSH或者SSH,默认为RSH,这可以通过环境变量 db2set DB2RSHCMD来设定,例如 db2set DB2RSHCMD=ssh,表示设置为SSH。下面重点介绍一下RSH的配置步骤。

1,检查rsh server是否安装
server1:~ # rpm -aq |grep rsh
rsh-0.17-573.2
wondershaper-1.1a-229.2
rsh-server-0.17-573.2
2,改配置文件,设定disable      = no
server1:~ # cat /etc/xinetd.d/rsh
# default: off
# description:
# The rshd server is a server for the rcmd(3) routine and,
# consequently, for the rsh(1) program. The server provides
# remote execution facilities with authentication based on
# privileged port numbers from trusted hosts.
#
service shell
{
        socket_type     = stream
        protocol        = tcp
        flags           = NAMEINARGS
        wait            = no
        user            = root
        group           = root
        log_on_success  += USERID
        log_on_failure  += USERID
        server          = /usr/sbin/tcpd
#       server_args     = /usr/sbin/in.rshd -L
        server_args     = /usr/sbin/in.rshd -aL
        disable         = no
}


server1:~ # cat /etc/xinetd.d/rlogin
# default: off
# description:
# Rlogind is a server for the rlogin program. The server provides remote
# execution with authentication based on privileged port numbers from trusted
# host
#
service login
{
        socket_type     = stream
        protocol        = tcp
        flags           = NAMEINARGS
        wait            = no
        user            = root
        group           = root
        log_on_success  += USERID
        log_on_failure  += USERID
        server          = /usr/sbin/tcpd
        server_args     = /usr/sbin/in.rlogind
#       server_args     = /usr/sbin/in.rlogind -a
        disable         = no
}


server1:~ # cat /etc/xinetd.d/rexec
# default: off
# description:
# Rexecd is the server for the rexec program. The server provides remote
# execution facilities with authentication based on user names and
# passwords.
#
service exec
{
        socket_type     = stream
        protocol        = tcp
        flags           = NAMEINARGS
        wait            = no
        user            = root
        group           = root
        log_on_success  += USERID
        log_on_failure  += USERID
        server          = /usr/sbin/tcpd
        server_args     = /usr/sbin/in.rexecd
        disable         = no
}
3,编辑 hosts.equiv和.rhosts文件

server1:~ # cat /etc/hosts
#
# hosts         This file describes a number of hostname-to-address
#               mappings for the TCP/IP subsystem.  It is mostly
#               used at boot time, when no name servers are running.
#               On small systems, this file can be used instead of a
#               "named" name server.
# Syntax:
#
# IP-Address  Full-Qualified-Hostname  Short-Hostname
#

127.0.0.1       localhost

192.168.214.130 server1


dpfinst1@server1:~> id
uid=1000(dpfinst1) gid=1001(ugrp) groups=16(dialout),33(video),1001(ugrp)
dpfinst1@server1:~> cat .rhosts
+

server1:~ # cat /etc/hosts.equiv
#
# hosts.equiv   This file describes the names of the hosts which are
#               to be considered "equivalent", i.e. which are to be
#               trusted enough for allowing rsh(1) commands.
#
# hostname
+server1

4,启动rsh服务

server1:~ # service xinetd restart
Shutting down xinetd:                                                done
Starting INET services. (xinetd)                                     done

如果觉得我的文章对您有用,请点赞。您的支持将鼓励我继续创作!

0

添加新评论0 条评论

Ctrl+Enter 发表

作者其他文章

X社区推广