如何配置一个环境变量HADOOP?
典型的配置:
export HADOOP_HOME=/usr/local/hadoop
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
export YARN_HOME=$HADOOP_HOMEexport
YARN_CONF_DIR=$HADOOP_HOME/etc/hadoop
export PATH=$PATH:$JAVA_HOME/bin:$HADOOP_HOME/bin:$HADOOP_HOME/sbin
export
LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:/usr/local/lib:$HADOOP_HOM
/lib/native
修改hadoop解压文件名称 :
mv hadoop-2.4.1 hadoop
将hadoop安装目录的权限赋值为hadoop用户:
chown -R hadoop:hadoop hadoop
创建Hadoop数据目录,并赋予权限:
[root@djt java]# mkdir -p /data/dfs/name
[root@djt java]# mkdir -p /data/dfs/data
[root@djt java]# mkdir -p /data/tmp
[root@djt java]# chown -R hadoop:hadoop hadoop /data/
[root@djt java]# ls -l /d
data/ dev/ [root@djt java]# ls -l /data/
total 8
drwxr-xr-x 4 hadoop hadoop 4096 May 21 17:26 dfs
drwxr-xr-x 2 hadoop hadoop 4096 May 21 17:26 tmp
1.1修改主机名
vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=itcast ###
2023-08-29 广告