hadoop安装步骤:
系统需要安装的包
ssh,rpm,gcc,make
yum -y install openssh-server openssh-clients
检测ssh安装和rpm安装
a. ssh localhost
b. yum install rpm
安装java
a. 安装java-7
rpm -Uvh java
b. 添加并配置新的jdk系统命令
update-alternatives –install “/usr/bin/java” “java” “/usr/java/jdk1.7.0_45/bin/java” 16001
update-alternatives –install “/usr/bin/java” “javac” “/usr/java/jdk1.7.0_45/bin/javac” 16001
alternatives –config java
alternatives –config javac
c. 检查并测试
update-alternatives –display java
java -version
添加hduser用户
a. groupadd hdgroup
b. useradd -g hdgroup hduser
c. passwc hduser
d. chown -R hduser .
e. chmod 755 hduser
f. chgrp -R hdgroup hduser
将da-master上的公钥拷贝到新机器上
ssh-copy-id -i id_rsa.pub hadoop@cloud011
修改主机名称和hosts文件
127.0.0.1 localhost
172.21.36.4 da-slave05
172.21.101.7 web2
172.21.101.30 da-master
172.21.101.31 da-slave01
172.21.101.32 da-slave02
172.21.101.33 da-slave03
172.21.101.34 da-slave04
::1 localhost6.localdomain6 localhost6
进入hduser用户环境
a. su - hduser
b. tar -zxf hadoop.2.2.0.tar.gz
c. ln -s hadoop-2.2.0 /
编辑环境变量
vim ~/.bahsrc
修改系统参数
a.关闭防火墙
service iptables stop
chkconfig iptables off
vim /etc/selinux/config
setenforce 0
service iptables status
b.修改最大文件打开数
1)vim /etc/security/limits.conf
c.调整交换分区大小
vim /etc/sysctl.conf
vm.swappiness = 0
vm.dirty_ratio = 5
10.将master上的数据库配置参数文件拷贝到该机器上来
11.同步时间: http://www.cnblogs.com/panfeng412/p/drop-caches-under-linux-system.html
http://blog.sina.com.cn/s/blog_79fded950101gfc7.html
介绍得比较简略,待有时间贴上图文演示,敬请期待!
原文地址:http://blog.csdn.net/lviiii/article/details/43983661