liangcmwn / docs

mydocs on git
0 stars 0 forks source link

Hadoop Pseudo-Distributed #9

Open liangcmwn opened 5 years ago

liangcmwn commented 5 years ago

version: 3.1.2

etc/hadoop/core-site.xml:

<configuration>
    <property>
        <name>fs.defaultFS</name>
        <value>hdfs://localhost:9000</value>
    </property>
</configuration>

etc/hadoop/hdfs-site.xml:

<configuration>
    <property>
        <name>dfs.replication</name>
        <value>1</value>
    </property>
</configuration>

$ bin/hdfs namenode -format

$ sbin/start-dfs.sh

liangcmwn commented 5 years ago

start-dfs.sh 添加:

HDFS_DATANODE_USER=root
HDFS_DATANODE_SECURE_USER=hdfs
HDFS_NAMENODE_USER=root
HDFS_SECONDARYNAMENODE_USER=root

hadoop-config.sh 添加: export JAVA_HOME=/usr/java/latest