资源描述:
《步安装好你的hadoop.docx》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、作者:隋成龙1在所有节点编辑好host文件三个节点,先定义好主机名!!!!!这步很重要分别是hadoop1,hadoop2,hadoop32在所有节点上创建密钥对hadoop106#ssh-keygen-trsahadoop114#ssh-keygen-trsahadoop120#ssh-keygen-trsa互相拷贝公钥hadoop106#ssh-copy-id-i/root/.ssh/id_rsa.pubhadoop2hadoop106#ssh-copy-id-i/root/.ssh/id_rsa.pubhadoop1hadoop106#ssh-copy-id-i/root/
2、.ssh/id_rsa.pubhadoop3hadoop114#ssh-copy-id-i/root/.ssh/id_rsa.pubhadoop1hadoop114#ssh-copy-id-i/root/.ssh/id_rsa.pubhadoop2hadoop114#ssh-copy-id-i/root/.ssh/id_rsa.pubhadoop3hadoop120#ssh-copy-id-i/root/.ssh/id_rsa.pubhadoop1hadoop120#ssh-copy-id-i/root/.ssh/id_rsa.pubhadoop2hadoop120#ssh-co
3、py-id-i/root/.ssh/id_rsa.pubhadoop33配置好yum源,并且把所有的软件包分发到主机上hadoop106#scp/usr/local/src/jdk-6u3-linux-i586.bin/usr/local/src/hadoop-0.20.2.tar.gzhadoop2:/usr/local/src/jdk-6u3-linux-i586.bin100%65MB10.9MB/s00:06hadoop-0.20.2.tar.gz100%43MB10.6MB/s00:04hadoop106#scp/usr/local/src/jdk-6u3-linux-
4、i586.bin/usr/local/src/hadoop-0.20.2.tar.gzhadoop3:/usr/local/src/jdk-6u3-linux-i586.bin100%65MB13.1MB/s00:05hadoop-0.20.2.tar.gz100%43MB14.2MB/s00:03hadoop106#4安装jdk和hadoophadoop106#chmod+xjdk-6u3-linux-i586.binhadoop106#./jdk-6u3-linux-i586.bin按照提示输入yes,把解出来的文件移动到/opt目录下并改名mvjdk1.6.0_03//op
5、t/jdk1.6修改环境变量[root@www~]#vim/root/.bash_profile#.bash_profile#Getthealiasesandfunctionsif[-f~/.bashrc];then.~/.bashrcfi#UserspecificenvironmentandstartupprogramsJAVA_HOME=/opt/jdk1.6PATH=$JAVA_HOME/bin:$PATH:$HOME/binCLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexportPATHCLASSPA
6、THunsetUSERNAME重启你的系统,或者重新登录执行命令#su-执行java-version看到以下内容则成功[root@www~]#java-versionjavaversion"1.6.0_03"Java(TM)SERuntimeEnvironment(build1.6.0_03-b05)JavaHotSpot(TM)ClientVM(build1.6.0_03-b05,mixedmode,sharing)其它主机上执行一样的操作在master节点上执行解压缩hadoop#tarfvxzhadoop-0.20.2.tar.gz-C/usr/local/编辑hadoop
7、配置文件hadoop106#pwd/usr/local/hadoop-0.20.2/confhadoop106#vimhadoop-env.shexportJAVA_HOME=/opt/jdk1.6hadoop106#vimcore-site.xml