手机版
你好,游客 登录 注册
背景:
阅读新闻

Hadoop集群安装&Hbase实验环境搭建

[日期:2013-04-28] 来源:Linux社区  作者:chessloveyou [字体: ]
1.安装Ubuntu 10.04操作系统
安装并配置telnet
1)安装
#apt-get install xinetd telnetd
2). 安装成功后,系统也会有相应提示:
sudo vi /etc/inetd.conf并加入以下一行
telnet stream tcp nowait telnetd /usr/sbin/tcpd /usr/sbin/in.telnetd
3). sudo vi /etc/xinetd.conf并加入以下内容:
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/
 
defaults
{
 
# Please note that you need a log_type line to be able to use log_on_success
# and log_on_failure. The default is the following :
# log_type = SYSLOG daemon info
 
instances = 60
log_type = SYSLOG authpriv
log_on_success = HOST PID
log_on_failure = HOST
cps = 25 30
}
 
includedir /etc/xinetd.d
4). sudo vi /etc/xinetd.d/telnet并加入以下内容:
# default: on
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
disable = no
flags = REUSE
socket_type = stream
wait = no
user = root
server = /usr/sbin/in.telnetd
log_on_failure = USERID
}
5). 重启机器或重启网络服务sudo /etc/init.d/xinetd restart
 
安装vim
sudo apt-get remove vim-common && sudo apt-get install vim

2.配置更新源(其实没必要)
配置ubuntu10.04网易更新源
vi /etc/apt/source-list
 
deb http://mirrors.163.com/ubuntu/ lucid main universe restricted multiverse
deb-src http://mirrors.163.com/ubuntu/ lucid main universe restricted multiverse
deb http://mirrors.163.com/ubuntu/ lucid-security universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-security universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ lucid-updates universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-proposed universe main multiverse restricted
deb http://mirrors.163.com/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-backports universe main multiverse restricted
deb-src http://mirrors.163.com/ubuntu/ lucid-updates universe main multiverse restricted

3.安装Java1.6
TIPS:
完美解决Ubuntu下vi编辑器方向键变字母的问题。
执行命令 sudo apt-get remove vim-common && sudo apt-get install vim
 
安装步骤:
1)为jdk 文件添加执行权限: # chmod +x jdk-6u43-linux-x64.bin
2)进行安装 : # ./jjdk-6u43-linux-x64.bin
3)增加JAVA_HOME环境变量(注意实际JAVA安装环境)
[root@test src]# vi /etc/profile
在最后面增加:
#set java environment
export JAVA_HOME=/usr/java/jdk1.6.0_43
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME CLASSPATH PATH
保存退出
4)使得刚刚添加到环境变量生效:
# source /etc/profile
5) 进入 /usr/bin/目录
#cd /usr/bin
#ln -s -f /usr/java/jdk1.6.0_18/jre/bin/java
#ln -s -f /usr/java/jdk1.6.0_18/bin/javac
6)在命令行输入
root@ubuntu:/usr/bin# java -version
java version "1.6.0_43"
Java(TM) SE Runtime Environment (build 1.6.0_43-b01)
Java HotSpot(TM) 64-Bit Server VM (build 20.14-b01, mixed mode)
 
Hadoop1.04 stable版本,下载地址:http://mirrors.cnnic.cn/apache/hadoop/common/
 
vi /etc/hosts
IP地址规划
192.168.123.11 master
192.168.123.12 slave1
192.168.123.13 slave2
 
安装软件 lrzsz(方便使用SecureCRT传输文件)
添加用户:
添加Hadoop专用系统用户hadoop:hduser
$ sudo addgroup hadoop
$ sudo adduser --ingroup hadoop hduser

克隆虚拟机两台!!!需要40-50分钟
linux
相关资讯       Hadoop集群  Hbase  Hadoop安装  Hadoop HBase 
本文评论   查看全部评论 (0)
表情: 表情 姓名: 字数

       

评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受上述条款