环境变量的设置

vim /etc/profile

export HADOOP_HOME=/opt/hadoop-2.6.5
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
export YARN_CONF_DIR=$HADOOP_HOME/etc/hadoop
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64
export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export SCALA_HOME=/opt/scala-2.11.8
export SPARK_HOME=/opt/spark-2.1.0-bin-hadoop2.6
export HIVE_HOME=/opt/apache-hive-2.1.1-bin
export ZOOKEEPER_HOME=/opt/zookeeper-3.4.9
export PYTHONPATH=$SPARK_HOME/python/:$SPARK_HOME/python/lib:SPYTHONPATH
export FLUME_HOME=/opt/apache-flume-1.7.0-bin
export PATH=$PATH:$HADOOP_HOME/bin:$HIVE_HOME/bin:$HADOOP_HOME/sbin:$JAVA_HOME/bin:$SPARK_HOME/bin:$SPARK_HOME/sbin:$SCALA_HOME/bin:$ZOOKEEPER_HOME/bin:$FLUME_HOME/bin

Master 上:

drwxr-xr-x 10 root  root     4096 May 31 10:17 ./
drwxr-xr-x 25 root  root     4096 May 24 14:22 ../
drwxr-xr-x  7 root  root     4096 May 23 14:11 apache-flume-1.7.0-bin/
drwxr-xr-x 10 root  root     4096 Apr 13 20:54 apache-hive-2.1.1-bin/
-rw-r--r--  1 root  root      650 Apr 16 18:46 derby.log
drwxrwxr-x 10 cloud cloud    4096 Nov 30 16:18 hadoop-2.6.5/
drwxr-xr-x  6 root  root     4096 Oct 15  2016 kafka_2.11-0.10.1.0/
drwxr-xr-x  5 root  root     4096 Apr 16 18:46 metastore_db/
-rw-r--r--  1 root  root  3923677 Apr 13 09:57 mysql-connector-java-5.1.41.tar.gz
drwxrwxr-x  6  1001  1001    4096 Mar  4  2016 scala-2.11.8/
drwxr-xr-x 14   500   500    4096 Apr 17 22:49 spark-2.1.0-bin-hadoop2.6/
drwxr-xr-x 10  1001  1001    4096 Aug 23  2016 zookeeper-3.4.9/

你可能感兴趣的:(环境变量的设置)