Hadoop伪分布集群部署——小问题解决

免密登录问题:
方案1:

修改/etc/ssh/ssh_config文件的配置,以后则不会再出现此问题
最后面添加:
StrictHostKeyChecking no
UserKnownHostsFile /dev/null

然后执行 /etc/init.d/sshd restart

方案2:删除 .ssh/文件
[fanyue@hadoop01 ~]$ rm -rf .ssh/
[fanyue@hadoop01 ~]$ ssh localhost
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
fanyue@localhost's password: 
Last login: Fri Apr 17 21:18:29 2020
[fanyue@hadoop01 ~]$ exit
登出
Connection to localhost closed.
[fanyue@hadoop01 ~]$ pwd
/home/fanyue
[fanyue@hadoop01 ~]$ cd ~/.ssh/ 
[fanyue@hadoop01 .ssh]$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/fanyue/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/fanyue/.ssh/id_rsa.
Your public key has been saved in /home/fanyue/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:yGTJZk1laqlypRzN9SRsefcqsH4u+0sTC0TUZ3VI/mw fanyue@hadoop01
The key's randomart image is:
+---[RSA 2048]----+
|        .+Bo...oo|
|     . * *++o.= .|
|      O O....+.. |
|     B B ..    o.|
|    . B S .o.  .E|
|     o    ...o.. |
|         .  +.   |
|          o...   |
|          .*+.   |
+----[SHA256]-----+
[fanyue@hadoop01 .ssh]$ cat id_rsa.pub >> authorized_keys
[fanyue@hadoop01 .ssh]$  chmod  600  ./authorized_keys 
[fanyue@hadoop01 .ssh]$ cd ~/.ssh
[fanyue@hadoop01 .ssh]$ ls -l
总用量 12
-rw-------. 1 fanyue fanyue  397 4月  17 21:38 authorized_keys
-rw-------. 1 fanyue fanyue 1675 4月  17 21:38 id_rsa
-rw-r--r--. 1 fanyue fanyue  397 4月  17 21:38 id_rsa.pub
[fanyue@hadoop01 .ssh]$ ssh localhost
Warning: Permanently added 'localhost' (ECDSA) to the list of known hosts.
Last login: Fri Apr 17 21:37:44 2020 from localhost
[fanyue@hadoop01 ~]$ exit
登出

主机名映射ip地址问题:
先查看
[fanyue@hadoop01 ~]$ cat /etc/hosts
编辑,在后面添加,将主机名绑定ip
[fanyue@hadoop01 ~]$ vim /etc/hosts
127.0.0.1 主机名
端口占用问题:
①可以通过netstat -tulnp | grep 端口号 查看当前端口号是否被占用
[fanyue@hadoop01 ~]$ netstat -tulnp|grep 18088
②lsof -i:端口号 查看端口号的id
[fanyue@hadoop01 ~]$ lsof -i:18088
③杀死进程
[fanyue@hadoop01 ~]$ kill -9 端口号

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值