Hadoop 2.5.1 + HBase 0.98 single-host

Source: Internet
Author: User

Package path: [email protected]: ~ /Something/download

========================================================== ==================================

1. Installation environment

Code:Sudo apt-get install openssh-server
Sudo apt-get install default-jdk



2. Install hadoop

Code:Wget http://mirror.ox.ac.uk/sites/rsync.apache.org/hadoop/common/hadoop-2.5.1/hadoop-2.5.1.tar.gz
Tar xzf hadoop-2.4.0.tar.gz
Sudo music hadoop-2.4.0 // usr/local
Cd/usr/local
Sudo ln-s hadoop-2.4.0/hadoop



3. Add a hadoop user

Code:Sudo adduser hadoop
Sudo chown-R hadoop: hadoop/usr/local/hadoop *
Sudo su-hadoop
Ssh-keygen-t rsa-P ""
Cat ~ /. Ssh/id_rsa.pub> ~ /. Ssh/authorized_keys
Sudo mkdir/usr/local/hadoop/tmp



4. Configure hadoop
Modify/usr/local/hadoop/etc/hadoop/hadoop-env.sh insert the following content before the export JAVA_HOME =$ {JAVA_HOME} line

Code:Export JAVA_HOME =/usr/lib/jvm/java-7-openjdk-amd64
Export HADOOP_CONF_DIR =/usr/local/hadoop/etc/hadoop


Modify/usr/local/hadoop/etc/hadoop/core-site.xml after <configuration> add

Code:<Property>
<Name> fs. default. name </name>
<Value> hdfs :/// localhost: 9000 </value>
</Property>
<Property>
<Name> hadoop. tmp. dir </name>
<Value>/usr/local/hadoop/tmp </value>
</Property>



5 Format hadoop

Code:/Usr/local/hadoop/bin/hadoop namenode-format



6. Start hadoop

Code:/Usr/local/hadoop/sbin/start-all.sh



7. Test hadoop

Code:/Usr/local/hadoop/bin/hadoop fs-df



#8 stop hadoop
#/Usr/local/hadoop/sbin/stop-all.sh

9. Exit hadoop users
Exit
--------------------------------------
HBASE

1 installation:

Code:Wget http://mirror.bit.edu.cn/apache/hbase/stable/hbase-0.98.6-hadoop2-bin.tar.gz
Tar xzf hbase-0.98.6-hadoop2-bin.tar.gz
Sudo mv hbase-0.98.6-hadoop2/usr/local/
Cd/usr/local/
Sudo ln-s hbase-0.98.6-hadoop2/hbase
Sudo chown-R hadoop: hadoop hbase *



2 configuration:

Code:Sudo su-hadoop


Edit/usr/local/hbase/conf/hbase-env.sh to find the row for export JAVA_HOME and insert the following:

Code:Export JAVA_HOME =/usr/lib/jvm/java-7-openjdk-amd64
Export HBASE_HOME =/usr/local/hbase



Edit/usr/local/hbase/conf/hbase-site.xml insert after the <configuration> line:

Code:<Property>
<Name> hbase. rootdir </name>
<Value> hdfs: /localhost: 9000/hbase </value>
</Property>
<Property>
<Name> dfs. replication </name>
<Value> 1 </value>
</Property>


3. Start:

Code:/Usr/local/hbase/bin/start-hbase.sh



4 Test:

Code:/Usr/local/hbase/bin/hbase shell
Hbase (main): 001: 0> status



#5 close:
#/Usr/local/hbase/bin/stop-hbase.sh

 

Hadoop 2.5.1 + HBase 0.98 single-host

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.