真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

hadoop1.1.2偽分布安裝的示例分析

這篇文章主要介紹了hadoop1.1.2偽分布安裝的示例分析,具有一定借鑒價(jià)值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

創(chuàng)新互聯(lián)建站是專業(yè)的萬全網(wǎng)站建設(shè)公司,萬全接單;提供成都做網(wǎng)站、成都網(wǎng)站建設(shè),網(wǎng)頁設(shè)計(jì),網(wǎng)站設(shè)計(jì),建網(wǎng)站,PHP網(wǎng)站建設(shè)等專業(yè)做網(wǎng)站服務(wù);采用PHP框架,可快速的進(jìn)行萬全網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴(kuò)展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團(tuán)隊(duì),希望更多企業(yè)前來合作!

1.偽分布式的安裝

      1.1 修改ip

                   (1)打開VMWare或者VirtualBox的虛擬網(wǎng)卡

                   (2)在VMWare或者VirtualBox設(shè)置網(wǎng)絡(luò)連接方式為host-only

                   (3)在linux中,修改ip。有上角的圖標(biāo),右鍵,選擇Edit  Connections....

                            ****ip必須與windows下虛擬網(wǎng)卡的ip在同一個(gè)網(wǎng)段,網(wǎng)關(guān)必須是存在的。

                   (4)重啟網(wǎng)卡,執(zhí)行命令service network restart

                            ****報(bào)錯(cuò),如no suitable adapter錯(cuò)誤,

                   (5)驗(yàn)證:執(zhí)行命令ifconfig

      1.2 關(guān)閉防火墻

                   (1)執(zhí)行命令:service iptables stop 關(guān)閉防火墻

                   (2)驗(yàn)證:執(zhí)行命令service iptables status

      1.3 關(guān)閉防火墻的自動開啟

                   (1)執(zhí)行命令chkconfig iptables off

                   (2)驗(yàn)證:執(zhí)行命令chkconfig --list|grep iptables

     1.4 修改hostname

                   (1)執(zhí)行命令hostname cloud4  修改會話中的hostname

                   (2)驗(yàn)證:執(zhí)行命令hostname

                   (3)執(zhí)行命令vi  /etc/sysconfig/network 修改文件中的hostname

                   (4)驗(yàn)證:執(zhí)行命令reboot -h now 重啟機(jī)器

      1.5 設(shè)置ip與hostname綁定

                   (1)執(zhí)行命令vi  /etc/hosts

                            在文本最后增加一行192.168.80.100 cloud4

                   (2)驗(yàn)證:ping cloud4

(3)在window中配置:主機(jī)名對應(yīng)的ip

C:\Windows\System32\drivers\etc\hosts

      1.6 ssh免密碼登陸

                   (1)執(zhí)行命令ssh-keygen -t rsa (然后一路Enter)  產(chǎn)生秘鑰位于/root/.ssh/

                   (2)執(zhí)行命令cp /root/.ssh/id_rsa.pub /root/.ssh/authorized_keys  產(chǎn)生授權(quán)文件

                   (3)驗(yàn)證:ssh localhost  (ssh 主機(jī)名)

      1.7 安裝jdk

                   (1)使用winscp把jdk、hadoop復(fù)制到linux的/root/Downloads

                   (2)cp  /root/Downloads/*  /usr/local

                   (3)cd /usr/local

                            賦予執(zhí)行權(quán)限 chmod u+x  jdk-6u24-linux-i586.bin

                   (4)./jdk-6u24-linux-i586.bin

                   (5)重命名 mv jdk1.6.0_24  jdk

                   (6)執(zhí)行命令 vi /etc/profile 設(shè)置環(huán)境變量 

                            增加兩行         export JAVA_HOME=/usr/local/jdk

                                                  export PATH=.:$JAVA_HOME/bin:$PATH

                            保存退出

                      執(zhí)行命令  source  /etc/profile

                    (7)驗(yàn)證:執(zhí)行命令java -version

      1.8 安裝hadoop

                   (1)執(zhí)行命令 tar -zxvf hadoop-1.1.2.tar.gz  解壓縮

                   (2)執(zhí)行命令  mv hadoop-1.1.2  hadoop

                   (3)執(zhí)行命令 vi  /etc/profile  設(shè)置環(huán)境變量

                            增加一行         export HADOOP_HOME=/usr/local/hadoop

                            修改一行         export PATH=.:$HADOOP_HOME/bin:$JAVA_HOME/bin:$PATH

                            保存退出

                      執(zhí)行命令  source  /etc/profile     

                   (4)驗(yàn)證:執(zhí)行命令 hadoop

                   (5)修改位于conf/的配置文件hadoop-env.sh、core-site.xml、hdfs-site.xml、mapred-site.xml

                            <1>文件hadoop-env.sh的第9行

                            export JAVA_HOME=/usr/local/jdk/

                            <2>文件core-site.xml

                           

                                    

                                               fs.default.name

                                               hdfs://cloud4:9000

                                               change your own hostname

                                    

                                    

                                               hadoop.tmp.dir

                                               /usr/local/hadoop/tmp

                                      

                           

                            <3>文件hdfs-site.xml

                           

                                    

                                               dfs.replication    #表示設(shè)置副本數(shù),默認(rèn)是3

                                               1

                                    

                                    

                                               dfs.permissions   #表示是否設(shè)置權(quán)限控制

                                               false

                                    

                           

如果是super-user(超級用戶),它是nameNode進(jìn)程的標(biāo)識。系統(tǒng)不會執(zhí)行任何權(quán)限檢查

                            <4>文件mapred-site.xml

                           

                                    

                                               mapred.job.tracker

                                               cloud4:9001

                                               change your own hostname

                                    

                           

                   (6)執(zhí)行命令 hadoop namenode -format 進(jìn)行格式化

                   (7)執(zhí)行命令 start-all.sh 啟動hadoop

                   (8)驗(yàn)證:

                            <1>執(zhí)行命令jps 查看java進(jìn)程,發(fā)現(xiàn)5個(gè)進(jìn)程,分別是NameNode、SecondaryNameNode、DataNode、JobTracker、TaskTracker

                            <2>通過瀏覽器查看:http://cloud4:50070 和 http://cloud4:50030

                                     *****修改windows的C:/Windows/system32/drivers/etc/目錄下的hosts文件

1.9如果去掉警告提示:

[root@cloud4 ~]# hadoop fs -ls /

Warning: $HADOOP_HOME is deprecated.(去掉警告)

方法如下:

[root@cloud4 ~]# vi /etc/profile   (添加一句話)

# /etc/profile

export HADOOP_HOME_WARN_SUPPRESS=1

export JAVA_HOME=/usr/local/jdk

export HADOOP_HOME=/usr/local/hadoop

export PATH=.:$HADOOP_HOME/bin:$JAVA_HOME/bin:$PATH

[root@cloud4 ~]# source /etc/peofile  (立即生效)

感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“hadoop1.1.2偽分布安裝的示例分析”這篇文章對大家有幫助,同時(shí)也希望大家多多支持創(chuàng)新互聯(lián),關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,更多相關(guān)知識等著你來學(xué)習(xí)!


網(wǎng)站標(biāo)題:hadoop1.1.2偽分布安裝的示例分析
地址分享:http://weahome.cn/article/jphhee.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部