好记性不如烂笔头-.bash_profile配置hadoop,hive,hbase环境变量

留个备份,以后用着方便~~

JAVA_HOME=/usr/java/latest

HADOOP_HOME=/usr/local/hadoop
HIVE_HOME=/usr/local/hive
HBASE_HOME=/usr/local/hbase


PATH=$PATH:$HOME/bin:/home/bin:/usr/local/hadoop/bin:/usr/java/jdk1.6.0_20/bin:$HADOOP_HOME/bin:$HIVE_HOME/bin:$HBASE_HOME/bin


for file in `ls $HADOOP_HOME/{*jar,lib/*jar}`
do
        HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$file
done


for file in `ls $HIVE_HOME/lib/*jar`
do
        HIVE_CLASSPATH=$HIVE_CLASSPATH:$file
done


for file in `ls $HBASE_HOME/{*jar,lib/*jar}`
do
        HBASE_CLASSPATH=$HBASE_CLASSPATH:$file
done


HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HIVE_CLASSPATH
HADOOP_CLASSPATH=$HADOOP_CLASSPATH:$HBASE_CLASSPATH
CLASSPATH=$HADOOP_CLASSPATH




export JAVA_HOME
export HADOOP_HOME
export HIVE_HOME
export HBASE_HOME
export CLASSPATH
export PATH

你可能感兴趣的:(好记性不如烂笔头-.bash_profile配置hadoop,hive,hbase环境变量)