1 ensure the same operating system , authentication , JDK installation path on every mainframe computers
2 vim /etc/hosts, add ip hostname in the shape of key/value,hostname should be unique,localhost should be deleted(!!important)
3 open ssh service,ensure all the mainframe computers can access each other without password
4 setup hadoop
  Export HADOOP_HOME=hadoop installation path
  Export PATH=$HADOOP_HOME/bin:$PATH


5 hadoop configuration
  (1) conf/hadoop-env.sh
      export JAVA_HOME=JDK installation path
  (2) add master ip into conf/masters,each ip at single line
      add slave ip into conf/slaves,each ip at single line
  (3) core-site.xml
 <configuration>
  <property>
   <name>hadoop.tmp.dir</name>
   <value>hadoop installation path</value>
  </property>
  <property>
   <name>fs.default.name</name>
   <value>hdfs://masterIP:9000(any not used port)</value>
  </property>
 </configuration>
(4) hdfs-site.xml
 <configuration>
  <property>
   <name>dfs.replication</name>
   <value>datanode num</value>
  </property>
  <property>
   <name>dfs.name.dir</name>
   <value>/tmp/dfs/name</value>
  </property>
  <property>
   <name>dfs.data.dir</name>
   <value>/tmp/dfs/data</value>
  </property> 
 </configuration>
 (5) mapred-site.xml
 <configuration>
  <property>
   <name>mapred.job.tracker</name>
   <value>masterIP:9001</value>
  </property>
 </configuration>


6 hbase configuration
  (1)conf/regionservers insert data like slaves configuration in hadoop
  (2)hbase-env.sh
     export JAVA_HOME=JDK installation path
     export HBASE_MANAGES_ZK=true
  (3)hbase-site.xml
 <configuration>
   <property>
  <name>hbase.rootdir</name>
  <value>hdfs://hadoopmasterip:9000/hbase</value>
   </property>
   <property>
  <name>hbase.cluster.distributed</name>
  <value>true</value>
   </property>
   <property>
  <name>hbase.master</name>
  <value>hbasemasterip:60000</value>
   </property>
   <property>
  <name>hbase.zookeeper.quorum</name>
  <value>any one regionserversIP(num should be odd)</value>
   </property>
 </configuration>

 

notice
  1 software version
     hadoop-1.0.4 hbase-0.94.7
  2 how to get jdk installation path
     update-alternatives --display java
     java_home /usr/lib/jvm/jre-1.6.0-openjdk.x86_64
  3 how to stop hbase
     on slave ./hbase-daemon.sh stop regionserver
     on master ./stop-hbase.sh