forked from mahmoudparsian/data-algorithms-book
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setenv.sh
executable file
·36 lines (32 loc) · 952 Bytes
/
setenv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# This is an example to set 3 environment variables
# You should update your script accrodingly
#
#set Java as jdk7
# macbook:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home
# linux:
# export JAVA_HOME=/usr/java/jdk7
echo "JAVA_HOME=$JAVA_HOME"
#
# set ant
export ANT_HOME=/Users/mparsian/zmp/zs/apache-ant-1.9.4
echo "ANT_HOME=$ANT_HOME"
#
export HADOOP_HOME=/Users/mparsian/zmp/zs/hadoop-2.6.0
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
# set PATH
export PATH=$JAVA_HOME/bin:$ANT_HOME/bin:$HADOOP_HOME/bin:$PATH
echo "PATH=$PATH"
#
BOOK_HOME=/Users/mparsian/zmp/github/data-algorithms-book
CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
CLASSPATH=$CLASSPATH:$HADOOP_CONF_DIR
jars=`find $BOOK_HOME/lib -name '*.jar'`
for j in $jars ; do
CLASSPATH=$CLASSPATH:$j
done
#
CLASSPATH=$CLASSPATH:$BOOK_HOME/dist/data_algorithms_book.jar
#
export CLASSPATH=$CLASSPATH
export HADOOP_CLASSPATH=$CLASSPATH