欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Linux配置免密登錄單機(jī)和全分布詳細(xì)教程

 更新時(shí)間:2021年12月02日 14:16:36   作者:一個人的牛牛  
大家好,本篇文章主要講的是Linux配置免密登錄單機(jī)和全分布詳細(xì)教程,感興趣的同學(xué)趕快來看一看吧,對你有幫助的話記得收藏一下哦

一:單機(jī)免密登錄配置

1.設(shè)置虛擬機(jī)主機(jī)名

hostnamectl --static set-hostname hadoop001

--static 參數(shù)代表永久生效 hadoop001為虛擬機(jī)主機(jī)名;

2.虛擬機(jī)中配置主機(jī)名與ip地址的映射關(guān)系

vi /etc/hosts

在文件的末尾添加? ? (IP地址可以用命令ip addr查看)

192.168.17.131 hadoop001

3.關(guān)閉防火墻

systemctl stop firewalld.service
systemctl disable firewalld.service

4.執(zhí)行如下命令:

 ssh-keygen -t rsa (執(zhí)行命令后,只需敲三次回車鍵)
 cd ~/.ssh/
 ssh-copy-id -i id_rsa.pub root@hadoop001

?成功?。。?/p>

二:全分布免密登錄配置

?1.設(shè)置每臺虛擬機(jī)的主機(jī)名

hostnamectl --static set-hostname hadoop001 (主節(jié)點(diǎn))
hostnamectl --static set-hostname hadoop002  (從節(jié)點(diǎn)1)
hostnamectl --static set-hostname hadoop003  (從節(jié)點(diǎn)2)

--static 參數(shù)代表永久生效 hadoop001為虛擬機(jī)主機(jī)名;

2.虛擬機(jī)中配置主機(jī)名與ip地址的映射關(guān)系(每一臺都要操作)

vi /etc/hosts

在文件的末尾添加? ? (IP地址可以用命令ip addr查看)

192.168.17.131 hadoop001
192.168.17.132 hadoop002
192.168.17.133 hadoop004

3.關(guān)閉防火墻(每一臺都要操作)

systemctl stop firewalld.service
systemctl disable firewalld.service

4.執(zhí)行如下命令:

ssh-keygen -t rsa (執(zhí)行命令后,只需敲三次回車鍵)
cd ~/.ssh/
ssh-copy-id -i id_rsa.pub root@hadoop001
ssh-copy-id -i id_rsa.pub root@hadoop002
ssh-copy-id -i id_rsa.pub root@hadoop003

?

成功!??!

到此這篇關(guān)于Linux配置免密登錄單機(jī)和全分布詳細(xì)教程的文章就介紹到這了,更多相關(guān)Linux免密登錄單機(jī)和全分布內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論