centos安装hadoop 相关步骤

给你一囗甜甜゛ 提交于 2020-01-29 05:28:42

1.hostname修改

切换到root用户

 vim /etc/sysconfig/network

 

修改为
NETWORKING=yes
HOSTNAME=server60

2.防火墙

切换到root用户

service iptables stop
chkconfig iptables off
chkconfig --list | grep iptables

对于centos7

启动: systemctl start firewalld
关闭: systemctl stop firewalld
查看状态: systemctl status firewalld
开机禁用 : systemctl disable firewalld
开机启用 : systemctl enable firewalld

3.host修改

 

切换到root用户

vim  /etc/hosts

修改为:
ip  server60

4.jdk安装

jdk链接:

参考这个安装方式 http://dblab.xmu.edu.cn/blog/install-hadoop/

 

5.hadoop账户添加sudo全部权限

vim /etc/sudoers

找到
root    ALL=(ALL)       ALL
复制一行,名字改为server60

6.ssh免密登录

ssh localhost

exit                           # 退出刚才的 ssh localhost
cd ~/.ssh/                     # 若没有该目录,请先执行一次ssh localhost
ssh-keygen -t rsa              # 会有提示,都按回车就可以
cat ./id_rsa.pub >> ./authorized_keys  # 加入授权


或者:
cd ~
mkdir -m 700 .ssh
cd ~/.ssh

ssh-keygen -t rsa (按四下回车)
ssh-copy-id server60  (然后输入密码123456)
chmod 600 authorized_keys

 

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!