Changeset 143 for hadoop4win-setup


Ignore:
Timestamp:
Feb 4, 2010, 9:58:23 PM (14 years ago)
Author:
jazz
Message:

細部微調

Location:
hadoop4win-setup
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • hadoop4win-setup/hadoop4win-setup.bat

    r141 r143  
    2020
    2121set HADOOP_FILE=hadoop-0.20.1.tar.gz
    22 set HADOOP_MIRROR=http://ftp.twaren.net/Unix/Web/apache/hadoop/core/hadoop-0.20.1/
     22set HADOOP_MIRROR=http://ftp.twaren.net/Unix/Web/apache/hadoop/core/hadoop-0.20.1
    2323set JDK_FILE=jdk1.6.0_18.zip
    24 set JDK_MIRROR=http://tsmc.classcloud.org/
     24set JDK_MIRROR=http://tsmc.classcloud.org
     25set HBASE_FILE=hbase-0.20.3.tar.gz
     26set HBASE_MIRROR=http://ftp.twaren.net/Unix/Web/apache/hadoop/hbase/hbase-0.20.3
    2527set CYGWIN_ROOT=C:\hadoop4win
    2628set LOCAL_REPOSITORY=%cd%
     
    3133
    3234set MY_PACKAGE=%LOCAL_REPOSITORY%\my_packages
    33 set HADOOP_SRC=%MY_PACKAGE%\hadoop\hadoop-*.gz
     35set HADOOP_SRC=%MY_PACKAGE%\hadoop\%HADOOP_FILE%
    3436set HADOOP_DES=%CYGWIN_ROOT%\usr\src
    35 set JDK_SRC=%MY_PACKAGE%\jdk\jdk*.zip
     37set JDK_SRC=%MY_PACKAGE%\jdk\%JDK_FILE%
    3638set JDK_DES=%CYGWIN_ROOT%\usr\src
     39set HBASE_SRC=%MY_PACKAGE%\hbase\%HBASE_FILE%
     40set HBASE_DES=%CYGWIN_ROOT%\usr\src
    3741
    3842REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     
    101105REM real do cygwin installation
    102106
    103 "%CYGWIN_SETUP%" -q -d -L -l "%LOCAL_REPOSITORY%\cygwin_mirror" -R "%CYGWIN_ROOT%" -P cygrunsrv,file,openssh,perl,procps,ncurses,rsync,sharutils,shutdown,subversion,tcp_wrappers,termcap,unzip,wget,zip,zlib
     107IF NOT EXIST "%CYGWIN_ROOT%" (
     108  "%CYGWIN_SETUP%" -q -d -L -l "%LOCAL_REPOSITORY%\cygwin_mirror" -R "%CYGWIN_ROOT%" -P cygrunsrv,file,openssh,perl,procps,ncurses,rsync,sharutils,shutdown,subversion,tcp_wrappers,termcap,unzip,wget,zip,zlib
     109)
    104110
    105111REM - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
     
    115121)
    116122
     123IF NOT EXIST "%HBASE_SRC%" (
     124  wget "%HBASE_MIRROR%/%HBASE_FILE%" -O "%MY_PACKAGE%\hbase\%HBASE_FILE%"
     125)
     126
     127pause
     128
    117129IF NOT EXIST "%JDK_DES%" (
    118130  mkdir "%JDK_DES%"
     
    125137IF NOT EXIST "%CYGWIN_ROOT%\lib\jvm" (
    126138  copy "%JDK_SRC%" "%JDK_DES%"
     139)
     140
     141IF NOT EXIST "%CYGWIN_ROOT%\opt\hbase" (
     142  copy "%HBASE_SRC%" "%HBASE_DES%"
    127143)
    128144
     
    139155cls
    140156echo "====================================================="
    141 echo " Use `start-hadoop' and `stop-hadoop' to run single"
    142 echo " machine hadoop configuration."
    143 echo " ."
     157echo " Use `start-hadoop' and `stop-hadoop' to run single  "
     158echo " machine hadoop configuration.                       "
     159echo " .                                                   "
    144160echo " Use `jps' to check java process for troubleshooting."
     161echo " .                                                   "
     162echo " Use `hbase-init' to install single machine HBase .  "
    145163echo "=====================================================" 
    146164set PATH=%OLDPATH%
  • hadoop4win-setup/my_packages/hadoop/bin/hadoop4win-init

    r140 r143  
    22mkdir -p /lib/jvm
    33mkdir -p /opt
     4
    45if [ ! -x /lib/jvm/jdk* ]; then
    56  unzip /usr/src/jdk*.zip -d /lib/jvm/
    67fi
     8
    79if [ ! -x /opt/hadoop ]; then
    810  tar zxvf /usr/src/hadoop-*.tar.gz -C /opt/
    911  ln -s /opt/hadoop-* /opt/hadoop
     12  cp -R /usr/src/conf-examples/ /opt/hadoop/
     13  mv /opt/hadoop/conf/ /opt/hadoop/conf-org
     14  ln -s /opt/hadoop/conf-examples/ /opt/hadoop/conf
    1015fi
    11 cp -R /usr/src/conf-examples/ /opt/hadoop/
    12 mv /opt/hadoop/conf/ /opt/hadoop/conf-org
    13 ln -s /opt/hadoop/conf-examples/ /opt/hadoop/conf
     16
    1417export JAVA_HOME=$(dirname /lib/jvm/jdk*/bin/)
    1518echo export JAVA_HOME=$JAVA_HOME >> /opt/hadoop/conf/hadoop-env.sh
  • hadoop4win-setup/my_packages/hbase/bin/hbase-init

    r142 r143  
    44fi
    55
    6 tar zxvf /usr/src/hbase-0.20.3.tar.gz -C /opt
    7 ln -s /opt/hbase-* /opt/hbase
     6if [ ! -f /opt/hase* ]; then
     7  tar zxvf /usr/src/hbase-0.20.3.tar.gz -C /opt
     8  ln -s /opt/hbase-* /opt/hbase
    89
    9 cp /opt/hadoop/conf/core-site.xml /opt/hbase/conf
    10 cp /opt/hadoop/conf/hdfs-site.xml /opt/hbase/conf
    11 cp /opt/hadoop/conf/mapred-site.xml /opt/hbase/conf
     10  cp /opt/hadoop/conf/core-site.xml /opt/hbase/conf
     11  cp /opt/hadoop/conf/hdfs-site.xml /opt/hbase/conf
     12  cp /opt/hadoop/conf/mapred-site.xml /opt/hbase/conf
    1213
    1314cat >> /opt/hbase/conf/hbase-env.sh << EOF
     
    3334EOF
    3435
    35 echo "export PATH=/opt/hbase/bin/:\$PATH" >> /etc/profile
    36 echo "/bin/stop-hbase" > ~/.bash_logout
    37 echo "/bin/stop-hadoop" >> ~/.bash_logout
    38 echo "/bin/stop-hbase" > /etc/skel/.bash_logout
    39 echo "/bin/stop-hadoop" >> /etc/skel/.bash_logout
     36  echo "export PATH=/opt/hbase/bin/:\$PATH" >> /etc/profile
     37  echo "/bin/stop-hbase" > ~/.bash_logout
     38  echo "/bin/stop-hadoop" >> ~/.bash_logout
     39  echo "/bin/stop-hbase" > /etc/skel/.bash_logout
     40  echo "/bin/stop-hadoop" >> /etc/skel/.bash_logout
    4041
    4142cat > ~/hbase-test << EOF
     
    5152EOF
    5253
    53 clear
    54 echo "=========================================="
    55 echo " !! NOTE !!                               "
    56 echo " please 'source /etc/profile' to update   "
    57 echo " current \$PATH environment variables or  "
    58 echo " login again to update \$PATH variables.  "
    59 echo " .                                        "
    60 echo " run 'start-hbase' to start hbase daemons."
    61 echo " run 'stop-hbase'  to stop hbase daemons. "
    62 echo " run 'hbase shell ~/hbase-test'  to test  "
    63 echo " hbase services.                          "
    64 echo "=========================================="
     54  clear
     55  echo "=========================================="
     56  echo " !! NOTE !!                               "
     57  echo " please 'source /etc/profile' to update   "
     58  echo " current \$PATH environment variables or  "
     59  echo " login again to update \$PATH variables.  "
     60  echo " .                                        "
     61  echo " run 'start-hbase' to start hbase daemons."
     62  echo " run 'stop-hbase'  to stop hbase daemons. "
     63  echo " run 'hbase shell hbase-test'  to test    "
     64  echo " hbase services.                          "
     65  echo "=========================================="
     66
     67  echo " Starting HBase ....."
     68  /bin/start-hbase
     69fi
Note: See TracChangeset for help on using the changeset viewer.