1. 安裝jdk1.7的環境 下載hadoop. hadoop-2.5.2.tar.gz版本html
2.進入hadoop的網站,點擊左下角的Documentation,找到對應的版本 ,點擊進入,找到Single Node Setup 的說明文檔,按照文檔說明開始配置java
# set to the root of your Java installation export JAVA_HOME=/usr/java/latest (java的環境位置)
Use the following:node
etc/hadoop/core-site.xml:web
<configuration> <property> <name>fs.defaultFS</name> <value>hdfs://localhost:8020</value> (ip地址) </property> </configuration>
etc/hadoop/hdfs-site.xml:apache
<configuration> <property> <name>dfs.replication</name> <value>1</value> </property> </configuration>
配置YARN on Single Nodeoop
Configure parameters as follows:網站
etc/hadoop/mapred-site.xml:code
<configuration> <property> <name>mapreduce.framework.name</name> <value>yarn</value> </property> </configuration>
etc/hadoop/yarn-site.xml:orm
<configuration> <property> <name>yarn.nodemanager.aux-services</name> <value>mapreduce_shuffle</value> </property> </configuration>
配置 hadoop.tmp.dirserver
在hadoop文件中建立data目錄
在etc/hadoop/core-site.xml:中添加
<property> <name>hadoop.tmp.dir</name> <value>/bigdata/softwares/hadoop-2.5.2/data/tmp</value> </property>
執行操做
$ bin/hdfs namenode -format
$ sbin/start-dfs.sh
$ sbin/start-yarn.sh
The hadoop daemon log output is written to the $HADOOP_LOG_DIR directory (defaults to $HADOOP_HOME/logs).
hbase
Example hbase-site.xml for Standalone HBase
<configuration> <property> <name>hbase.rootdir</name> <value>hdfs://ip:8080/data</value> </property> <property> <name>hbase.zookeeper.property.dataDir</name> <value>/bigdata/softwares/hbase-1.2.3/data/zkData</value> </property> </configuration>
<property> <name>hbase.cluster.distributed</name> <value>true</value> </property>
修改 regionserver 中的ip地址
bin/hbase-daemon.sh start zookeeper
bin/hbase-daemon.sh start master
bin/hbase-daemon.sh start regionserver
http://192.168.1.23:16030/rs-status 端口邊了