您好,登錄后才能下訂單哦!
本篇文章為大家展示了在CentOS系統上怎樣配置rsh,rcp,scp多節點互通,內容簡明扼要并且容易理解,絕對能使你眼前一亮,通過這篇文章的詳細介紹希望你能有所收獲。
我們在使用CentOS系統時候,安裝RAC時,需要配置各個節點的互信關系,使rsh、rlogin、rcp等命令不需要輸入密碼可以操作其他節點。除了按照管法rac安裝文檔中的方法配置ssh之外,還可以通過修改.rhosts等文件實現互信。在unix(如aix)中,可以簡單修改/etc/hosts.equiv實現,但是Linux中比較麻煩,需要一些其他的步驟,下面我們來演示在CentOS系統中配置方法:
CentOS系統時需要在各個節點上完成如下操作
1、檢查在CentOS系統中rsh-server包是否已經安裝
[root@rac1 ~]# rpm -qa|grep -i ^rsh-server
rsh-server-0.17-40.el5
如果沒有安裝使用rpm -ivh 命令安裝
2、確保/etc/xinetd.d/rlogin中存在disable = no這一行
[root@rac1 ~]# cat /etc/xinetd.d/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 {disable = no socket_type = stream wait = no user = root log_on_success += USERID log_on_failure += USERID server = /usr/sbin/in.rlogind}
3、確保/etc/xinetd.d/rsh中存在disable = no這一行
[root@rac1 ~]# cat /etc/xinetd.d/rsh # default: on # description: The rshd server is the 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 { disable = no socket_type = stream wait = no user = root log_on_success += USERID log_on_failure += USERID server = /usr/sbin/in.rshd }
4、在CentOS系統重啟xinetd服務
[root@rac1 ~]# service xinetd restart
Stopping xinetd: [ OK ]
Starting xinetd: [ OK ]
5、在CentOS系統編輯/etc/securetty,確保存在rexec、rsh、rlogin三行
[root@rac1 ~]# cat /etc/securetty console vc/1 vc/2 vc/3 vc/4 vc/5 vc/6 vc/7 vc/8 vc/9 vc/10 vc/11 tty1 tty2 tty3 tty4 tty5 tty6 tty7 tty8 tty9 tty10 tty11 rexec rsh rlogin
6、在CentOS系統編輯/etc/hosts.equiv文件,如下所示
[root@rac1 ~]# cat /etc/hosts.equiv +rac1 oracle +rac2 oracle +rac1-priv oracle +rac2-priv oracle +rac1 root +rac2 root +rac1-priv root +rac2-priv root
7、在CentOS系統編輯/etc/hosts文件,如下所示
[root@rac1 ~]# cat /etc/hosts # Do not remove the following line, or various programs # that require network functionality will fail. 127.0.0.1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6 #public 192.168.2.101 rac1.localdomain rac1 192.168.2.102 rac2.localdomain rac2 #private 192.168.0.101 rac1-priv.localdomain rac1-priv 192.168.0.102 rac2-priv.localdomain rac2-priv #virtual 192.168.2.111 rac1-vip.localdomain rac1-vip 192.168.2.112 rac2-vip.localdomain rac2-vip
8、在CentOS系統編輯~/.rhosts,如下所示
[root@rac1 ~]# cat ~/.rhosts
+rac1 root
+rac2 root
+rac1-priv root
+rac2-priv root
9、測試rlogin和rsh是否可以不用輸入密碼登錄其他節點
[root@rac1 ~]# rlogin rac2 connect to address 192.168.2.102 port 543: Connection refused Trying krb4 rlogin... connect to address 192.168.2.102 port 543: Connection refused trying normal rlogin (/usr/bin/rlogin) Last login: Wed Jan 13 08:39:17 from rac1 [root@rac2 ~]# hostname rac2.localdomain [root@rac2 ~]# exit logout rlogin: connection closed. [root@rac1 ~]# rsh rac2 connect to address 192.168.2.102 port 543: Connection refused Trying krb4 rlogin... connect to address 192.168.2.102 port 543: Connection refused trying normal rlogin (/usr/bin/rlogin) Last login: Wed Jan 13 08:47:22 from rac1 [root@rac2 ~]# hostname rac2.localdomain [root@rac2 ~]# exit logout rlogin: connection closed.
上述內容就是在CentOS系統上怎樣配置rsh,rcp,scp多節點互通,你們學到知識或技能了嗎?如果還想學到更多技能或者豐富自己的知識儲備,歡迎關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。