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

Last change on this file since 128 was 128, checked in by jazz, 15 years ago
  • 0.1 alpha release ( Network Installation Version )
  • Property svn:executable set to *
File size: 1000 bytes
Line 
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/)
15echo JAVA_HOME=$JAVA_HOME >> /opt/hadoop/conf/hadoop-env.sh
16ln -s $JAVA_HOME/bin/javac /bin/
17cd $JAVA_HOME
18chmod a+x `find . -name "*.exe"`
19chmod a+x `find . -name "*.dll"`
20javac -version
21cd /opt/hadoop
22bin/hadoop namenode -format
23echo "Press any key to start HDFS and MapReduce Scheduler ..."
24read
25/opt/hadoop/bin/hadoop-daemon.sh start namenode
26/opt/hadoop/bin/hadoop-daemon.sh start datanode
27/opt/hadoop/bin/hadoop-daemon.sh start jobtracker
28/opt/hadoop/bin/hadoop-daemon.sh start tasktracker
29cygstart http://localhost:50070
30cygstart http://localhost:50030
Note: See TracBrowser for help on using the repository browser.