Install Hadoop on Xubuntu

Source: Internet
Author: User

0. Install Xubuntu

We recommend to set username as "Hadoop"

After installation, set user "Hadoop" as Administrator

sudo addgroup Hadoop  

Open/etc/sudoers File

sudo gedit/etc/sudoers

Add Hadoop all= (All:all) all under root all= (All:all) all

1. Install Java

1. Unzip the Java tarball to usr/Java (the new folder). Can be used after decompression2. Configure environment variables. as follows in etc/profile file. Add the following at the end of the text #SetJava Environment Export Java_home=/usr/java/jdk1.7. 0_67 Export Jre_home=/usr/java/jdk1.7.0_67/JRE Export PATH= $PATH:/usr/java/jdk1.7.0_67/Bin Export CLASSPATH=./:/usr/java/jdk1.7.0_67/lib:/usr/java/jdk1.7.0_67/jre/Lib3. Configure immediate effect command source/etc/ Profile4. Detect if the configuration was successful in Java-version if not, restart Linux

2. Configure login in SSH without entering password

Please operate under User "Hadoop"

Su- hadoop  sudo apt-get
Sudo/etc/init.d/ssh start

CD ~/.ssh
Ssh-keygen-t rsa-p ""
Cat ~/.ssh/id_rsa.pub>> ~/.ssh/authorized_keys

3. Install Hadoop

1. Unzip hadoop.tar.gz into/usr/Hadoop
Then, ensure user "Hadoop" Owns/usr/hadoop
  
sudo chown-r hadoop:hadoop Hadoop
2. Edit Environment2.1gedit/etc/Profile Append these:export java_home=/usr/java/Export Jre_home=/usr/java/JRE Export Hadoop_install=/usr/Hadoopexport PATH= $PATH: $JAVA _home/bin: $HADOOP _install/bin: $HADOOP _install/Sbinexport CLASSPATH=./:/usr/java/lib:/usr/java/jre/Lib2.2gedit/usr/hadoop/conf/hadoop-env.sh Append these:# the Java implementation to use. Required.export Java_home=/usr/Java Export Hadoop_install=/usr/Hadoopexport PATH= $PATH: $JAVA _home/bin: $HADOOP _install/bin: $HADOOP _install/Sbin3. Restart Linux

4. Test

[Email protected]:~$ [email protected]:~$ Java-Versionjava version"1.7.0_79"Java (TM) SE Runtime Environment (build1.7.0_79-B15) Java HotSpot (TM) --bit Server VM (build24.79-b02, Mixed mode) [Email protected]:~$ Hadoop Versionhadoop1.2.1Subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-1.2-r 1503152Compiled by Mattf on Mon Jul A  the: at: thePdt -From source with checksum 6923c86528809c4e7e6f493b6b413a9athis command is runusing/usr/hadoop/hadoop-core-1.2.1. Jar[email protected]:~$

5. Hadoop Pseudo-distributed

edit three files:1). core-Site.xml:<configuration> <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> </configuration>2). hdfs-Site.xml:<configuration> <property> <name>dfs.replication</name> <value>2</value> </property> <property> <name>dfs.name.dir</name> <va          Lue>/usr/local/hadoop/datalog1,/usr/local/hadoop/datalog2</value> </property> <property> <name>dfs.data.dir</name> <value>/usr/local/hadoop/data1,/usr/local/hadoop/data2</val Ue> </property> </configuration>3). mapred-Site.xml:<configuration> <property> <name>mapred.job.tracker</name> &LT;VALUE&G T;localhost:9001</value> </property> </configuration>2. Start Hadoop to related services, format namenode, Secondarynamenode, Tasktracker:[email protected]:/usr/local/hadoop$ source/usr/local/hadoop/conf/hadoop-env.sh [email protected]:/usr/local/hadoop$ Hadoop Namenode-format
View Code

6*. Install hbase[pseudo-distributed]

1. Unzip hbase.tar.gz into/usr/HBase Then, ensure user"Hadoop"owns/usr/hbase sudo chown-R hadoop:hadoop hbase2. Edit Environment2.1gedit/etc/Profile Append these:export hbase_home="/usr/hbase"Export PATH= $HBASE _home/Bin: $PATH2.2gedit/usr/hbase/conf/hbase-site.xml Append these:<property> <name>hbase.rootdir</name> <!--configuration items for HDFs in Hadoop--<value>hdfs://localhost:9000/hbase</value></property> <property> <name>hbase.cluster.distributed</name> <value>true</value></property><property> <name>hbase.master.info.port</name> <value>60010</value></property>2.3gedit/usr/hbase/hbase-env.sh Modify these:# the Java implementation to use. Java1.6Required.export Java_home=/usr/java/# Extra Java CLASSPATH elements. Optional.export Hbase_classpath=/usr/hadoop/conf# tell HBase whether it should manage it's own instance of Zookeeper or not.Export hbase_manages_zk=true3. Restart Linux

#. References

http://blog.csdn.net/zhaoyl03/article/details/8657104#http://  Www.tuicool.com/articles/VZn6zi

http://blog.csdn.net/zhaoyl03/article/details/8657104#

http://blog.csdn.net/pdw2009/article/details/21261417

Http://www.th7.cn/db/nosql/201510/134214.shtml

Install Hadoop on Xubuntu

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.