Environment: Ubuntu10.10JDK1.6.0.27hadoop0.20.2 I. JDK installation in Ubuntu: 1. download jdk-6u27-linux-i586.bin2. copy to usrjava and set object operation permissions. $. jdk-6u27-linux-i586.bin start installation 4. set the environment variable vietcprofile and add JAVA_HOME at the end of the file.
Environment: Ubuntu 10.10 JDK1.6.0.27 hadoop 0.20.2
1. Install JDK in Ubuntu:
1. Download jdk-6u27-linux-i586.bin
2. Copy to/usr/java and set the object operation permission.
3. $./jdk-6u27-linux-i586.bin start Installation
4. Set the environment variable vi/etc/proFileAdd at the end of the file
JAVA_HOME =/usr/Java/jdk1.6.0 _ 27
PATH = $ JAVA_HOME/bin: $ PATH
CLASSPATH =.: $ JAVA_HOME/lib/tooLs. Jar: $ JAVA_HOME/lib/dt. jar
ExPort PATH JAVA_HOME CLASSPATH
5. Set the JDK installed by the user to the default JDK and run
$ UpDate-Alternatives -- install/usr/bin/java/usr/lib/jvm/java/jdk1.6.0 _ 12/bin/java 300
$ Update-alternatives -- install/usr/bin/javac/usr/lib/jvm/java/jdk1.6.0 _ 12/bin/javac 300
$ Update-alternatives -- config java
6. Input java-version to install the SDK.
Ii. Install ssh in Ubuntu:
1. $SuDo apt-get install openssh-server
2. start ssh/etc/init. d/ssh start
3. $ ps-e |GrepSsh to verify whether sshserver is enabled
4. Password-free
$ Ssh-keygen-t dsa-P \ '-f ~ /. Ssh/Id_ Dsa
$Cat~ /. Ssh/id_dsa.pub> ~ /. Ssh/authorizEd_ Keys
3. Install hadoop in Ubuntu:
1. Download hadoop-0.4102.tar.gz, put in/usr/hadoop http://apache.etoak.com//hadoop/core/
2.Extract$ Tar zxvf hadoop-0.20.2.tar.gz
3. Modify the hadoop configuration file
Conf/hadoop-env.sh modify JAVA_HOME options:
ExportJAVA_HOME =/usr/java/jdk.1.6.0 _ 27
4. Pseudo-Distributed Single-Host Configuration
Conf/core-site.xml
- Xml Version=\ "1.0 \"?>
- Xml-stylesheet Type=\ "Text/xsl \" Href=\ "Configuration. xsl \"?>
-
- <Configuration>
- <Property>
- <Name>Fs. default. name Name>
- <Value>HDfS: // localhost: 9000 Value>
- Property>
- Configuration>
Conf/hdfs-site.xml:
- Xml Version=\ "1.0 \"?>
- Xml-stylesheet Type=\ "Text/xsl \" Href=\ "Configuration. xsl \"?>
-
- <Configuration>
- <Property>
- <Name>Dfs. replication Name>
- <Value>1 Value>
- Property>
- Configuration>
Conf/mapred-site.xml:
- Xml Version=\ "1.0 \"?>
- Xml-stylesheet Type=\ "Text/xsl \" Href=\ "Configuration. xsl \"?>
-
- <Configuration>
- <Property>
- <Name>Mapred. job.TrAcker Name>
- <Value>Localhost: 9001 Value