Last change
on this file since 240 was
236,
checked in by jazz, 14 years ago
|
- modified my_packages/hadoop/bin/hadoop4win-init
- [BUGFIX] fix error at line 31
- modified my_packages/hbase/bin/hbase-init
- add HBASE_PID_DIR to hbase-env.sh
- modified my_packages/ant/bin/ant-init
- fix syntax error of unzip
|
-
Property svn:executable set to
*
|
File size:
1.2 KB
|
Rev | Line | |
---|
[129] | 1 | #!/bin/bash |
---|
| 2 | mkdir -p /lib/jvm |
---|
| 3 | mkdir -p /opt |
---|
[143] | 4 | |
---|
[129] | 5 | if [ ! -x /lib/jvm/jdk* ]; then |
---|
| 6 | unzip /usr/src/jdk*.zip -d /lib/jvm/ |
---|
| 7 | fi |
---|
[143] | 8 | |
---|
[129] | 9 | if [ ! -x /opt/hadoop ]; then |
---|
| 10 | tar zxvf /usr/src/hadoop-*.tar.gz -C /opt/ |
---|
| 11 | ln -s /opt/hadoop-* /opt/hadoop |
---|
[143] | 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 |
---|
[129] | 15 | fi |
---|
[143] | 16 | |
---|
[129] | 17 | export JAVA_HOME=$(dirname /lib/jvm/jdk*/bin/) |
---|
[136] | 18 | echo export JAVA_HOME=$JAVA_HOME >> /opt/hadoop/conf/hadoop-env.sh |
---|
| 19 | echo export HADOOP_HOME=/opt/hadoop >> /opt/hadoop/conf/hadoop-env.sh |
---|
[140] | 20 | echo export HADOOP_CLASSPATH=/opt/hadoop >> /opt/hadoop/conf/hadoop-env.sh |
---|
| 21 | echo export HADOOP_CONF_DIR=/opt/hadoop/conf >> /opt/hadoop/conf/hadoop-env.sh |
---|
| 22 | echo export JAVA_HOME=$JAVA_HOME >> /etc/profile |
---|
| 23 | echo "export PATH=/opt/hadoop/bin/:$JAVA_HOME/bin:\$PATH" >> /etc/profile |
---|
[129] | 24 | cd $JAVA_HOME |
---|
| 25 | chmod a+x `find . -name "*.exe"` |
---|
| 26 | chmod a+x `find . -name "*.dll"` |
---|
| 27 | cd /opt/hadoop |
---|
[236] | 28 | /opt/hadoop/bin/hadoop namenode -format |
---|
[232] | 29 | source /etc/profile |
---|
[140] | 30 | /bin/start-hadoop |
---|
[236] | 31 | /opt/hadoop/bin/hadoop fs -mkdir tmp |
---|
[140] | 32 | echo "/bin/stop-hadoop" > ~/.bash_logout |
---|
| 33 | echo "/bin/stop-hadoop" > /etc/skel/.bash_logout |
---|
[129] | 34 | cygstart http://localhost:50070 |
---|
[139] | 35 | cygstart http://localhost:50030 |
---|
[236] | 36 | exit |
---|
Note: See
TracBrowser
for help on using the repository browser.