中文字幕av专区_日韩电影在线播放_精品国产精品久久一区免费式_av在线免费观看网站

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

redhat6.下安裝配置hadoop環境--單實例版本

發布時間:2020-08-31 15:13:06 來源:網絡 閱讀:246 作者:敏而所學 欄目:大數據

redhat6.4下(用作hadoop master :記錄所有數據分布情況--namenode)--安裝單實例計算機
1、修改hostname
[root@hadoop01 ]# vim /etc/hosts
[root@hadoop01 ]# hostname
hadoop01
2、關閉防火墻
[root@hadoop01]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter [ OK ]
iptables: Flushing firewall rules: [ OK ]
iptables: Unloading modules: [ OK ]
[root@hadoop01 ]# chkconfig iptables off
[root@hadoop01 ]# vi /etc/selinux/config
3、配置java環境
[root@hadoop01 ]# vi /etc/profile
export JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/
export JRE_HOME=$JAVA_HOME/jre
export CLASSPARH=$JACA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
[root@hadoop01 ]# source /etc/profile //環境生效
[root@hadoop01 ]# mv hadoop-2.7.6 /opt
4、新建hadoop文件夾
mkdir /root/hadoop
mkdir /root/hadoop/tmp
mkdir /root/hadoop/var
mkdir /root/hadoop/dfs
mkdir /root/hadoop/dfs/name
mkdir /root/hadoop/dfs/data
5、配置hadoop
[root@hadoop01 hadoop]# pwd
/opt/hadoop-2.7.6/etc/hadoop
[root@hadoop01 hadoop]vim hadoop-env.sh //修改JAVA_HOME
export HADOOP_OPTS="-Djava.library.path=${HADOOP_HOME}/lib/native"
JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/

[root@hadoop01 hadoop]vim yarn-env.sh //修改JAVA_HOME
JAVA_HOME=/usr/lib/jvm/jre-1.7.0-openjdk.x86_64/

[root@hadoop01 hadoop]# vim core-site.xml
<!-- 指定hadoop運行時產生文件的存儲目錄 -->
<property>
<name>hadoop.tmp.dir</name>
<value>/root/hadoop/tmp</value>
<description>Abase for other temporary directories.</description>
</property>
<property>
<name>io.file.bufefer.size</name>
<value>131072</value>
</property>
<!--配置namenode的地址-->
<property>
<name>fs.default.name</name>
<value>hdfs://hadoop01:9000</value>
</property>

[root@hadoop01 hadoop]#vim hdfs-site.xml
<property>
<name>dfs.namenode.secondary.http-address</name>
<value>hdfs://hadoop01:9001</value>
</property>
<property>
<name>dfs.namenode.dir</name>
<value>/root/hadoop/dfs/name</value>
<description>Path on the local filesystem where theNameNode stores the namespace and transactions logs persistently.</description>
</property>
<property>
<name>dfs.datanode.dir</name>
<value>/root/hadoop/dfs/data</value>
<description>Comma separated list of paths on the localfilesystem of a DataNode where it should store its blocks.</description>
</property>
<!--指定hdfs的副本數-->
<property>
<name>dfs.replication</name>
<value>3</value>
</property>
<property>
<name>dfs.webhdfs.enabled</name>
<value>true</value>
</property>

[root@hadoop01 hadoop# vim mapred-site.xml
<!– 第三個就是制定當前Hadoop的并行運行計算架構,這里為yarn,第四個就是Job運行的歷史記錄Server,第五個就是歷史運行記錄的Web服務器。 –>
<property>
<name>mapred.job.tracker</name>
<value>hadoop01:9001</value>
</property>
<property>
<name>mapred.local.dir</name>
<value>/root/hadoop/var</value>
</property>
<!-- 指定mr運行在yarn上 -->
<property>
<name>mapreduce.framework.name</name>
<value>yarn</value>
</property>
<!--歷史服務的端口地址-->
<property>
<name>mapreduce.jobhistory.address</name>
<value>hadoop01:10020</value>
</property>
<!--歷史服務的web端口地址 -->
<property>
<name>mapreduce.jobhistory.webapp.address</name>
<value>hadoop01:19888</value>
</property>

[root@hadoop01 hadoop]# vim yarn-site.xml
<!-- 指定nodeManager組件在哪個機子上跑 -->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
<!-- 指定resourcemanager組件在哪個機子上跑 -->
<property>
<name>yarn.resourcemanager.hostname</name>
<value>hadoop01</value>
</property>
<!--resourcemanager web地址--> <property>
<name>yarn.resourcemanager.webapp.address</name>
<value>hadoop01:8088</value>
</property>
<!--啟用日志聚集功能-->
<property>
<name>yarn.log-aggregation-enable</name>
<value>true</value>
</property>
<!--在HDFS上聚集的日志最多保存多長時間-->
<property>
<name>yarn.log-aggregation.retain-seconds</name>
<value>86400</value>
</property>

[root@hadoop01 hadoop# vi /etc/profile
export HADOOP_HOME=/opt/hadoop-2.7.6
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"
export PATH=.:${JAVA_HOME}/bin:${HADOOP_HOME}/bin:$PATH:$HADOOP_HOME/sbin
6、初始化并啟動HADOOP
[root@hadoop01 bin]# ./hadoop namenode -format //初始化
[root@hadoop01 current]# pwd
/root/hadoop/dfs/name/current
[root@hadoop01 current]# ls //驗證初始化成功
fsimage_0000000000000000000 fsimage_0000000000000000000.md5 seen_txid VERSION
[root@hadoop01 sbin]# pwd
/opt/hadoop-2.7.6/sbin
[root@hadoop01 sbin]# ./start-dfs.sh //啟動HDFS
Starting namenodes on [hadoop01]
The authenticity of host 'hadoop01 (172.19.15.151)' can't be established.
RSA key fingerprint is 00:57:cb:a6:0d:28:05:17:58:0b:5f:8c:9d:2e:c5:1f.
Are you sure you want to continue connecting (yes/no)? yes
hadoop01: Warning: Permanently added 'hadoop01,172.19.15.151' (RSA) to the list of known hosts.
root@hadoop01's password:
hadoop01: starting namenode, logging to /opt/hadoop-2.7.6/logs/hadoop-root-namenode-hadoop01.out
root@localhost's password:
localhost: starting datanode, logging to /opt/hadoop-2.7.6/logs/hadoop-root-datanode-hadoop01.out
Starting secondary namenodes [0.0.0.0]
The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established.
RSA key fingerprint is 00:57:cb:a6:0d:28:05:17:58:0b:5f:8c:9d:2e:c5:1f.
Are you sure you want to continue connecting (yes/no)? yes
0.0.0.0: Warning: Permanently added '0.0.0.0' (RSA) to the list of known hosts.
root@0.0.0.0's password:
0.0.0.0: starting secondarynamenode, logging to /opt/hadoop-2.7.6/logs/hadoop-root-secondarynamenode-hadoop01.out
[root@hadoop01 sbin]# ./start-yarn.sh //啟動yarn
[root@hadoop01 sbin]# start-yarn.sh
-bash: start-yarn.sh: command not found
[root@hadoop01 sbin]# ./start-yarn.sh
starting yarn daemons
starting resourcemanager, logging to /opt/hadoop-2.7.6/logs/yarn-root-resourcemanager-hadoop01.out
root@localhost's password:
localhost: starting nodemanager, logging to /opt/hadoop-2.7.6/logs/yarn-root-nodemanager-hadoop01.out
7、查看是否啟動成功
[root@hadoop01 sbin]# jps
27916 DataNode
28629 Jps
28239 ResourceManager
27779 NameNode
28083 SecondaryNameNode
28531 NodeManager
8、網頁訪問
http://172.19.15.151:8088/cluster
http://172.19.15.151:50070

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

江达县| 宾阳县| 连山| 南溪县| 金阳县| 广河县| 临武县| 闻喜县| 陕西省| 合肥市| 神木县| 孝感市| 伊通| 苏尼特右旗| 隆子县| 凌源市| 烟台市| 东兰县| 广宁县| 左贡县| 德格县| 仁怀市| 醴陵市| 茌平县| 监利县| 南安市| 曲周县| 华亭县| 扶绥县| 江源县| 仁布县| 淮滨县| 布尔津县| 都匀市| 临西县| 赫章县| 新巴尔虎右旗| 如东县| 澄迈县| 陆河县| 临夏市|