root@hadoop-master:/myhadoop# export HADOOP\_PREFIX=/myhadoop/hadoop-2.7.1
root@hadoop-master:/myhadoop# export HADOOP_CONF_DIR=$HADOOP_PREFIX/etc/hadoop
root@hadoop-master:~# vim /myhadoop/hadoop-2.7.1/etc/hadoop/hadoop-env.sh
#export JAVA_HOME=${JAVA_HOME}
export JAVA_HOME=/usr/lib/jvm/java-8-oracle/
If you want to change it globally and at system level;
root@hadoop-master:~# vim /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games"
export JAVA_HOME=/usr/lib/jvm/java-8-oracle/
No comments:
Post a Comment