/etc/profile.d/hadoop.sh
# set the hadoop home
export HADOOP_HOME="/usr/lib/hadoop-current"
export HADOOP_PID_DIR="${HADOOP_HOME}/pids"
export YARN_PID_DIR=${HADOOP_PID_DIR}
# set hadoop log dir
export HADOOP_LOG_DIR="/data/bigdata/log/hadoop-hdfs"
export YARN_LOG_DIR="/data/bigdata/log/hadoop-yarn"
export HADOOP_MAPRED_LOG_DIR="/data/bigdata/log/hadoop-mapred"
if [[ -n $HADOOP_HOME ]]; then
export PATH=$HADOOP_HOME/bin:$PATH
export PATH=$HADOOP_HOME/sbin:$PATH
fi
# set the hive home
export HIVE_HOME="/usr/lib/hive-current"
if [[ -n $HIVE_HOME ]]; then
export PATH=$HIVE_HOME/bin:$PATH
fi
#zookeeper
export ZOOKEEPER_HOME="/usr/lib/zookeeper-current"
#set zookeeper log dir
export ZOO_LOG_DIR="/data/bigdata/log/zookeeper"
if [[ -n $ZOOKEEPER_HOME ]]; then
export PATH=$ZOOKEEPER_HOME/bin:$PATH
fi
# set the hbase home
export HBASE_HOME="/usr/lib/hbase-current"
# set hbase log dir
export HBASE_LOG_DIR="/data/bigdata/log/hadoop-hbase"
if [[ -n $HBASE_HOME ]]; then
export PATH=$HBASE_HOME/bin:$PATH
fi
ulimit -u 32767
ulimit -c unlimited
/opt/apps 目录结构
drwxr-xr-x. 10 hadoop hadoop 184 Aug 23 18:48 apache-hive-3.1.0-bin
-rw-r--r--. 1 root root 436868323 Aug 24 10:14 apache-phoenix-5.0.0-HBase-2.0-bin.tar.gz
drwxr-xr-x. 10 hadoop hadoop 161 Aug 21 18:16 hadoop-3.1.1
drwxr-xr-x. 7 hadoop hadoop 182 Aug 29 12:10 hbase-2.1.0
drwxr-xr-x. 7 hadoop hadoop 245 Jul 7 16:09 jdk1.8.0_181
drwxr-xr-x. 10 hadoop hadoop 4096 Aug 28 21:42 zookeeper-3.4.13
/usr/lib 软连接
lrwxrwxrwx. 1 root root 22 Aug 21 16:54 hadoop-current -> /opt/apps/hadoop-3.1.1
lrwxrwxrwx. 1 root root 21 Aug 29 12:27 hbase-current -> /opt/apps/hbase-2.1.0
lrwxrwxrwx. 1 root root 31 Aug 23 19:43 hive-current -> /opt/apps/apache-hive-3.1.0-bin
lrwxrwxrwx. 1 root root 26 Aug 28 21:53 zookeeper-current -> /opt/apps/zookeeper-3.4.13
/data/bigdata目录
drwxr-xr-x. 7 hadoop hadoop 102 Aug 29 14:45 log
drwxr-xr-x. 3 hadoop hadoop 63 Aug 28 21:56 zookeeper
/data/bigdata/log目录
drwxrwxr-x. 2 hadoop hadoop 4096 Aug 29 15:05 hadoop-hbase
drwxrwxr-x. 2 hadoop hadoop 4096 Aug 29 14:43 hadoop-hdfs
drwxrwxr-x. 2 hadoop hadoop 194 Aug 23 22:41 hadoop-mapred
drwxrwxr-x. 3 hadoop hadoop 4096 Aug 29 14:44 hadoop-yarn
drwxrwxr-x. 2 hadoop hadoop 27 Aug 28 21:56 zookeeper