登录后我们就开始搭建我们的hadoop伪分布式系统
修改主机名与IP地址的对应关系[root@VM_11_203_centos ~]# hostname
查看主机名[root@VM_11_203_centos ~]# vim /etc/hosts
修改文件为一下内容
然后输入reboot重启机器
配置ssh免密码登录
[root@VM_11_203_centos ~]# ssh 211.159.153.214
The authenticity of host '211.159.153.214 (211.159.153.214)' can't be established.
ECDSA key fingerprint is 22:49:b2:5c:7c:8f:73:56:89:29:8a:bd:56:49:74:66.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '211.159.153.214' (ECDSA) to the list of known hosts.
root@211.159.153.214's password:
这里我们要输入密码特别的不方便,所以要取消。
输入ssh-keygen -t rsa然后四个回车
[root@VM_11_203_centos ~]# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
e4:7d:24:39:20:e1:27:07:3b:4c:8d:b0:3d:f6:4f:13 root@VM_11_203_centos
The key's randomart image is:
+--[ RSA 2048]----+
| ..=+. |
| *.+.. . |
| . X + E . |
| . X . = |
| S + . |
| o o |
| . |
| |
| |
+-----------------+
然后复制密钥到本机
[root@VM_11_203_centos ~]# ssh-copy-id 211.159.153.214
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@211.159.153.214's password:
[root@VM_11_203_centos ~]# ssh 211.159.153.214
Last login: Thu Mar 16 17:26:00 2017 from 218.21.34.74
3509



被折叠的 条评论
为什么被折叠?



