ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 为DB2 DPF环境配置RSH

为DB2 DPF环境配置RSH

原创 Linux操作系统 作者:王飞鹏2011 时间:2012-12-09 22:00:23 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

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/25714482/viewspace-750823/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
暂无介绍

注册时间:2011-04-27

  • 博文量
    58
  • 访问量
    587854