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
来源:CSDN
作者:地质队炼丹师
链接:https://blog.csdn.net/qq_28612967/article/details/103613519