9 install hadoop
<1> Installation
Tar-zvxf hadoop-1.1.2.tar.gz
Music hadoop-1.1.2/usr/lib/hadoop
<2> Environment Variables
Run gedit/etc/profile to add and modify it:
Export java_home =/usr/lib/JVM
Export hadoop_home =/usr/lib/hadoop/
Export Path =.: $ java_home/bin: $ hadoop_home/bin: $ path
Source/etc/profile
10 configure hadoop
<1>/usr/lib/hadoop/conf # gedit hadoop-env.sh
Change row 9th:
Export java_home =/usr/lib/JVM
<2>/usr/lib/hadoop/conf # gedit core-site.xml
<Configuration>
<Property>
<Name> fs. Default. Name </Name>
<Value> HDFS: // hadoop: 9000 </value>
<Description> hadoop </description>
</Property>
<Property>
<Name> hadoop. TEM. dir </Name>
<Value>/usr/lib/hadoop/temp </value>
</Property>
</Configuration>
<3>/usr/lib/hadoop/conf # gedit hdfs-site.xml
<Configuration>
<Property>
<Name> DFS. Replication </Name>
<Value> 1 </value>
</Property>
<Property>
<Name> DFS, permissions </Name>
<Value> false </value>
</Property>
</Configuration>
<4>/usr/lib/hadoop/conf # gedit mapred-site.xml
<Configuration>
<Property>
<Name> mapred. Job. Tracker </Name>
<Value> hadoop </value>
</Property>
</Configuration>
<5> Format HDFS
Run: hadoop namenode-format
<6> Start hadoop
/Usr/lib # start-all.sh output the following message:
Warning: $ hadoop_home is deprecated.
Starting namenode, logging to/usr/lib/hadoop/libexec/../logs/hadoop-root-namenode-hadoop.out
Localhost: Starting datanode, logging to/usr/lib/hadoop/libexec/../logs/hadoop-root-datanode-hadoop.out
Localhost: Starting secondarynamenode, logging to/usr/lib/hadoop/libexec/.../logs/hadoop-root-secondarynamenode-hadoop.out
Starting jobtracker, logging to/usr/lib/hadoop/libexec/../logs/hadoop-root-jobtracker-hadoop.out
Localhost: Starting tasktracker, logging to/usr/lib/hadoop/libexec/../logs/hadoop-root-tasktracker-hadoop.out
<7> test URL
Http: // localhost: 50030/-hadoop Management Interface
Http: // localhost: 50060/-hadoop task tracker status
Http: // localhost: 50070/-hadoop DFS status
Testing Process
JPS has five processes in addition to JPS
<8> support windows browser testing
Modify the c: \ windows \ system32 \ drivers \ etc \ hosts file and add
192.168.80.100 hadoop
[Hadoop learning] -- (2) Installing and starting hadoop