集羣環境下配置hadoop,zookeeper,hbase第一部分

1.本環境採用兩臺linux環境,ip分別爲:
192.168.56.101
192.168.56.102
分別修改兩臺機器的/etc/hosts文件,增加如下內容:
192.168.56.101 master
192.168.56.102 slave
我們以master作爲namenode服務器,slave爲datenode服務器,首先安裝jdk並配置環境變量和ssh(安裝過程省略,請參考

網上資料)
2.安裝hadoop,修改如下配置文件:
兩臺機器的hadoop安裝路徑要相同,切記,切忌!!!
1)修改core-site.xml爲:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
<property>
<name>fs.default.name</name>
<value>hdfs://master:9000</value>
</property>
</configuration>
2)修改hdfs-site.xml爲:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>dfs.support.append</name>
<value>true</value>
</property>
<property>
<name>dfs.datanode.max.xcievers</name>
<value>4096</value>
</property>
</configuration>
3)修改mapred-site.xml爲:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>

<!-- Put site-specific property overrides in this file. -->

<configuration>
<property>
<name>mapred.job.tracker</name>
<value>master:9001</value>
</property>
</configuration>
4)修改masters爲:
master
5)修改slaves爲:
slave
6)格式化hadoop文件系統:
hadoop namenode -format
7)啓動hadoop:
start-all.sh
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章