Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
learn:bigdata:install_hadoop_eco_system_single_mode [2014/08/14 22:52] – yehuda | learn:bigdata:install_hadoop_eco_system_single_mode [2022/01/03 16:03] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 4: | Line 4: | ||
<code bash> | <code bash> | ||
sudo apt-get install openjdk-7-jdk ssh rsync | sudo apt-get install openjdk-7-jdk ssh rsync | ||
- | cd /tmp | ||
- | wget http:// | ||
- | tar xzf hadoop-2.5.0.tar.gz | ||
- | sudo mv hadoop-2.5.0 /usr/local/ | ||
- | sudo ln -s / | ||
- | sudo chown -R hduser: | ||
sudo addgroup hadoop | sudo addgroup hadoop | ||
Line 21: | Line 15: | ||
Edit ~/.bashrc | Edit ~/.bashrc | ||
<code bash> | <code bash> | ||
- | export HADOOP_HOME=/ | + | export HADOOP_HOME=/ |
+ | export JAVA_HOME=/ | ||
+ | export ZOOKEEPER_PREFIX=/ | ||
- | # Set JAVA_HOME (we will also configure JAVA_HOME directly for Hadoop later on) | ||
- | export JAVA_HOME=/ | ||
- | |||
- | # Some convenient aliases and functions for running Hadoop-related commands | ||
unalias hfs &> /dev/null | unalias hfs &> /dev/null | ||
alias hfs=" | alias hfs=" | ||
Line 32: | Line 24: | ||
alias hls=" | alias hls=" | ||
- | # If you have LZO compression enabled in your Hadoop cluster and | ||
- | # compress job outputs with LZOP (not covered in this tutorial): | ||
- | # Conveniently inspect an LZOP compressed file from the command | ||
- | # line; run via: | ||
- | # | ||
- | # $ lzohead / | ||
- | # | ||
- | # Requires installed ' | ||
- | # | ||
lzohead () { | lzohead () { | ||
hadoop fs -cat $1 | lzop -dc | head -1000 | less | hadoop fs -cat $1 | lzop -dc | head -1000 | less | ||
} | } | ||
- | # Add Hadoop bin/ directory to PATH | ||
export PATH=$PATH: | export PATH=$PATH: | ||
</ | </ | ||
+ | |||
+ | |||
+ | ===== Install Hadoop ===== | ||
+ | <code bash> | ||
+ | cd /tmp | ||
+ | wget http:// | ||
+ | tar xzf hadoop-2.5.0.tar.gz | ||
+ | sudo mv hadoop-2.5.0 /usr/local/ | ||
+ | sudo ln -s / | ||
+ | sudo chown -R hduser: | ||
+ | </ | ||
+ | |||
+ | Edit / | ||
+ | <code xml> | ||
+ | <?xml version=" | ||
+ | <? | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | at. If " | ||
+ | and reduce task. | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | Edit / | ||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | scheme and authority determine the FileSystem implementation. | ||
+ | uri's scheme determines the config property (fs.SCHEME.impl) naming | ||
+ | the FileSystem implementation class. | ||
+ | determine the host, port, etc. for a filesystem.</ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | Format | ||
+ | <code bash> | ||
+ | cd / | ||
+ | bin/hadoop namenode -format | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Zookeeper ===== | ||
+ | |||
+ | |||
+ | <code bash> | ||
+ | wget http:// | ||
+ | tar -zxvf zookeeper* | ||
+ | sudo mv zookeeper-3.4.6 /usr/local/ | ||
+ | sudo ln -s / | ||
+ | sudo chown -R hduser: | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | vi / | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | tickTime=2000 | ||
+ | dataDir=/ | ||
+ | clientPort=2181 | ||
+ | </ | ||
+ | |||
+ | <code bash> | ||
+ | sudo mkdir / | ||
+ | sudo chown -R hduser: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== HBase ===== | ||
+ | <code bash> | ||
+ | wget http:// | ||
+ | tar -zxvf hbase* | ||
+ | sudo mv hbase-0.98.5-hadoop2 /usr/local/ | ||
+ | sudo ln -s / | ||
+ | sudo chown -R hduser: | ||
+ | </ | ||
+ | Edit / | ||
+ | < | ||
+ | export JAVA_HOME=/ | ||
+ | </ | ||
+ | |||
+ | Edit / | ||
+ | <code xml> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | |||
+ | ===== Start ALL ===== | ||
+ | |||
+ | <code bash> | ||
+ | cd / | ||
+ | sbin/ | ||
+ | |||
+ | cd / | ||
+ | bin/ | ||
+ | |||
+ | cd / | ||
+ | bin/ | ||
+ | |||
+ | #start hbase shell | ||
+ | ./bin/hbase shell | ||
+ | </ | ||
+ | |||
+ |