搭建hadoop集群 使用集群命令 xcall 时 出现bash: ****: command not found

------------------slave2 --------------------
bash: jps: command not found
查看了我的环境变量  cat /etc/profile 后几行如下:

bash: ****: command not found

发现配置好了,没错啊 但就是有问题

在大佬的帮助下,发现 # ~/.bashrc 也是配置环境变量的地方   就索性吧  #set java home 下的行也配到这个里面

然后source ~/.bashrc

再出回到master里 执行xcall jps 就好!!!

bash: ****: command not found

再后来 发现我这个master里的 #~/.bashrc里没有配 也是能用的啊   

想了下原因 结论如下:

 

ssh连接过去并没有读取etc profile文件,看来是读取了.bashrc

 

相关文章:

  • 2021-11-27
  • 2021-12-11
  • 2021-10-22
  • 2021-07-28
  • 2021-11-01
  • 2022-03-04
  • 2022-02-22
猜你喜欢
  • 2021-08-19
  • 2021-09-05
  • 2021-07-17
  • 2021-08-11
  • 2021-10-11
  • 2021-11-01
  • 2022-02-27
相关资源
相似解决方案