In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces the relevant knowledge of "how to build hadoop environment under linux". Xiaobian shows you the operation process through actual cases. The operation method is simple and fast, and the practicality is strong. I hope this article "how to build hadoop environment under linux" can help you solve the problem.
1. Download the hadoop package
wget http://apache.freelamp.com/hadoop/core/stable/hadoop-0.20.2.tar.gz
2、tar xvzf hadoop-0.20.2.tar.gz
3. Install jdk, download jdk directly from oracle website, address: www.oracle.com/technetwork/java/javase/downloads/index.html
4、chmod +x jdk-6u21-linux-i586.bin;./ jdk-6u21-linux-i586.bin, jdk1.6.0_21 directory appears in the current directory
5. Configure java environment variable vi /etc/profile
The copy code is as follows:
export java_home=/root/src/hadoop/jdk1.6.0_21
export classpath=$classpath:$java_home/lib:$java_home/jre/lib
export path=$path:$java_home/bin
Execute source /etc/profile under Terminal to validate configuration
6, can be viewed with the following command
Show java version java -vesion
The copy code is as follows:
echo $java_home
which java
echo $path
echo $classpath
If java-version doesn't show your version of jdk, check your path settings.
7. Configure the hadoop environment variable vi /etc/profile
The copy code is as follows:
export hadoop_install=/root/src/hadoop/hadoop-0.20.2
export path=$path:$hadoop_install/bin
source /etc/profile takes effect
8. Test environment
Hadoop version shows
hadoop 0.20.2
subversion https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.20 -r 911707
compiled by chrisdo on fri feb 19 08:07:34 utc 2010
9. Configuration
Each component of hadoop is configured using an xml file, with core attributes in core-site.xml, hdfs attributes in hdfs-site.xml, and mapred-site.xml for mapred-reduce attributes. These files are in the conf subdirectory.
Hadoop has three modes: native mode, pseudo-distributed mode and fully distributed mode. The default configuration is native mode. There is no daemon process. Everything runs on a single jvm.
About "how to build hadoop environment under linux" content introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the industry information channel. Xiaobian will update different knowledge points for you every day.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.