Hadoop2.7.1分布式安装-准备篇

环境说明

VirtualBox5(三台),CentOS7,Hadoop2.7.1,

1、网络设置为桥接方式

参考:

http://www.cnblogs.com/york-hust/archive/2012/03/29/2422911.html

http://www.douban.com/group/topic/15558388/


2、关闭防火墙

[root@localhost ~]# systemctl stop firewalld.service  
[root@localhost ~]# systemctl disable firewalld.service
rm '/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service'
rm '/etc/systemd/system/basic.target.wants/firewalld.service'
[root@localhost ~]# systemctl status firewalld.service
firewalld.service - firewalld - dynamic firewall daemon
   Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled)
   Active: inactive (dead)

Jul 28 22:06:54 localhost.localdomain systemd[1]: Starting firewalld - dynami...
Jul 28 22:06:59 localhost.localdomain systemd[1]: Started firewalld - dynamic...
Jul 28 22:38:46 localhost.localdomain systemd[1]: Stopping firewalld - dynami...
Jul 28 22:38:46 localhost.localdomain systemd[1]: Stopped firewalld - dynamic...
Hint: Some lines were ellipsized, use -l to show in full.
vi /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=enforcing  #注释掉
SELINUX=disabled   #新增
# SELINUXTYPE= can take one of three two values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
#SELINUXTYPE=targeted  #注释掉


~                                                                               
~                                                                               
~                                                                               
~                                             
~                                                                               
"/etc/selinux/config" 15L, 565C
setenforce 0


3、创建用户用于hadoop安装

参考Linux常用命令

注意:除配置网络设置和jdk安装使用root之外,其他都是用本步创建的用户。


4、配置hostname,设置主机名

参考【网络】CentOS6.5下修改hostname主机名


5、配置host,设置ip和主机名的映射

vi /etc/hosts

Hadoop2.7.1分布式安装-准备篇


6、配置静态ip

参考

【网络】CentOS6.5下设置静态IP   

【网络】CentOS7修改网卡名称为eth0

注意:不同主机要设置到同一网段。


7、下载并安装JDK(压缩包版),配置环境变量

参考【开发环境】CentOS6.5下安装Oracle JDK


8、根据本机再复制两台虚拟机

使用VirtualBox复制多台虚拟机时,请重新初始化网络,并设置主机名、ip等。当然在ip等设置好后可能仍然主机间无法通讯,或许以下链接可以帮助你:

VirtualBox克隆后网卡无法正常启动的处理办法


9、配置SSH免密码登录

参考SSH免密码登录的配置方法

注意:SSH的目的是为了hadoop的众多进程间通讯,所以应使用之前创建的hadoop安装用户。需要的话,root也可以做一下,为了方便运维。除了要配置与其他机器的SSH免密码外,还要配置本机到本机的免密码SSH,否则在启动hadoop的时候,还是会提示输入密码。


你可能感兴趣的:(hadoop,hadoop安装,hadoop2.7.1,hadoop2.7.1安装,hadoop-2.7.1安装)