大数据Hadoop集群环境搭建(三)

在配置hadoop环境中
一、修改Hostname

1. 临时修改hostname

[root@localhost localhost]# hostname hadoop

这种修改方式,系统重启后就会失效。

2、 永久修改hostname

想永久修改,应该修改配置文件 /etc/sysconfig/network。

命令:[root@bigdata-senior01 ~] vim /etc/sysconfig/network

打开文件后,

NETWORKING=yes  #使用网络
HOSTNAME=hadoop  #设置主机名

二、配置Host

命令:[root@bigdata-senior01 ~] vi /etc/hosts
添加hosts: 192.168.100.10 hadoop

三、关闭防火墙

学习环境可以直接把防火墙关闭掉。

(1) 用root用户登录后,执行查看防火墙状态。

[root@ hadoop]# service iptables status

(2) 用[root@ hadoop]# service iptables stop关闭防火墙,这个是临时关闭防火墙。

[root@bigdata-senior01 hadoop-2.5.0]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]

(3) 如果要永久关闭防火墙用。

[root@ hadoop]# chkconfig iptables off

关闭,这种需要重启才能生效。

猜你喜欢

转载自blog.csdn.net/wth_97/article/details/85266477