source: hadoop4win-setup/my_packages/hadoop/bin/hadoop4win-init @ 139

Last change on this file since 139 was 139, checked in by jazz, 15 years ago

use bash -c to run hadoop4win-init script
create default HDFS tmp folder for current user

  • Property svn:executable set to *
File size: 1.1 KB
RevLine 
[129]1#!/bin/bash
2mkdir -p /lib/jvm
3mkdir -p /opt
4if [ ! -x /lib/jvm/jdk* ]; then
5  unzip /usr/src/jdk*.zip -d /lib/jvm/
6fi
7if [ ! -x /opt/hadoop ]; then
8  tar zxvf /usr/src/hadoop-*.tar.gz -C /opt/
9  ln -s /opt/hadoop-* /opt/hadoop
10fi
11cp -R /usr/src/conf-examples/ /opt/hadoop/
12mv /opt/hadoop/conf/ /opt/hadoop/conf-org
13ln -s /opt/hadoop/conf-examples/ /opt/hadoop/conf
14export JAVA_HOME=$(dirname /lib/jvm/jdk*/bin/)
[136]15echo export JAVA_HOME=$JAVA_HOME >> /opt/hadoop/conf/hadoop-env.sh
16echo export HADOOP_HOME=/opt/hadoop >> /opt/hadoop/conf/hadoop-env.sh
[129]17ln -s $JAVA_HOME/bin/javac /bin/
[136]18ln -s /opt/hadoop/bin/hadoop /bin/
19ln -s /opt/hadoop/bin/hadoop-config.sh /bin/
[129]20cd $JAVA_HOME
21chmod a+x `find . -name "*.exe"`
22chmod a+x `find . -name "*.dll"`
23javac -version
24cd /opt/hadoop
25bin/hadoop namenode -format
26/opt/hadoop/bin/hadoop-daemon.sh start namenode
27/opt/hadoop/bin/hadoop-daemon.sh start datanode
28/opt/hadoop/bin/hadoop-daemon.sh start jobtracker
29/opt/hadoop/bin/hadoop-daemon.sh start tasktracker
30cygstart http://localhost:50070
[139]31cygstart http://localhost:50030
32bin/hadoop fs -mkdir tmp
33exit
Note: See TracBrowser for help on using the repository browser.