标签:uuid gate pad 火墙 edit map nod mat 节点
配置Linux环境????????????? DEVICE="eth0"
????????????? BOOTPROTO="static"?????????????? ###
????????????? HWADDR="00:0C:29:3C:BF:E7"
????????????? IPV6INIT="yes"
????????????? NM_CONTROLLED="yes"
????????????? ONBOOT="yes"
????????????? TYPE="Ethernet"
????????????? UUID="ce22eeca-ecde-4536-8cc2-ef0dc36d4a8c"
????????????? IPADDR="192.168.1.101"?????????? ###
????????????? NETMASK="255.255.255.0"????????? ###
????????????? GATEWAY="192.168.1.1"??????????? ###
修改各个虚拟机主机名
????????????? vi /etc/sysconfig/network
????????????? NETWORKING=yes
????????????? HOSTNAME=node-1???
修改主机名和IP的映射关系
????????????? vi /etc/hosts
????????????? 192.168.1.101 node-1
????????????? 192.168.1.102 node-2
????????????? 192.168.1.103 node-3
关闭防火墙
????????????? #查看防火墙状态
????????????? service iptables status
????????????? #关闭防火墙
????????????? service iptables stop
????????????? #查看防火墙开机启动状态
????????????? chkconfig iptables --list
????????????? #关闭防火墙开机启动
????????????? chkconfig iptables off
配置ssh免登陆
?????? ??? #生成ssh免登陆密钥
?????? ssh-keygen -t rsa (四个回车)
?????? 执行完这个命令后,会生成两个文件id_rsa(私钥)、id_rsa.pub(公钥)
?????? 将公钥拷贝到要免密登陆的目标机器上
?????? ssh-copy-id node-2
?????? ssh-copy-id node-3
同步集群时间
?????? ???? 常用的手动进行时间的同步
????????????? date -s "2018-03-03 03:03:03"
?????? ???? 或者网络同步:
????????????? yum install ntpdate
????????????? ntpdate cn.pool.ntp.org
安装JDK并配置环境变量
上传jdk
????????????? rz jdk-8u65-linux-x64.tar.gz
解压jdk
????????????? tar -zxvf jdk-8u65-linux-x64.tar.gz -C /root/apps
将java添加到环境变量中
????????????? vim /etc/profile
????????????? #在文件最后添加
????????????? export JAVA_HOME=/root/apps/jdk1.8.0_65
????????????? export PATH=$PATH:$JAVA_HOME/bin
????????????? export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
????????????? #刷新配置
????????????? source /etc/profile
安装hadoop2.7.4
上传hadoop的安装包到服务器
?????? ???? hadoop-2.7.4-with-centos-6.7.tar.gz
解压安装包
?????? ???? tar zxvf hadoop-2.7.4-with-centos-6.7.tar.gz
?????? ?? ??注意:hadoop2.x的配置文件目录:$HADOOP_HOME/etc/hadoop
配置hadoop的核心配置文件
配置文件hadoop-env.sh
vi hadoop-env.sh
export JAVA_HOME=/root/apps/jdk1.8.0_65
配置文件core-site.xml
说明:指定HADOOP所使用的文件系统schema(URI),HDFS的主节点(NameNode)地址
<property>
?????? ?????? <name>fs.defaultFS</name>
?????? ?????? <value>hdfs://node-1:9000</value>
</property>
说明:指定hadoop运行时产生文件的存储目录,默认/tmp/hadoop-${user.name} -->
<property>
?????? ?????? <name>hadoop.tmp.dir</name>
?????? ?????? <value>/home/hadoop/hadoop-2.4.1/tmp</value>
</property>
配置文件hdfs-site.xml?
标签:uuid gate pad 火墙 edit map nod mat 节点
原文地址:http://blog.51cto.com/14133322/2330665