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 lucid main universe restricted multiverse
deb-src lucid main universe restricted multiverse
deb lucid-security universe main multiverse restricted
deb-src lucid-security universe main multiverse restricted
deb lucid-updates universe main multiverse restricted
deb lucid-proposed universe main multiverse restricted
deb-src lucid-proposed universe main multiverse restricted
deb lucid-backports universe main multiverse restricted
deb-src lucid-backports universe main multiverse restricted
deb-src 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版本,下载地址:
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分钟