新扩容机器规划:

hostnameip进程
slave310.183.225.167datanode,nodemange

1. 修改/etc/hosts

增加新扩容机器的hostname

10.183.225.167 slave3

2. 将/etc/hosts同步到其他服务器

scp /etc/hosts slave3:/etc/

3. 将hadoop拷贝至slave3

scp -r /xxx/soft/hadoop-2.7.3 slave3:/xxx/soft/

4. 将jsvc拷贝至slave3(安全模式datanode需要通过jsvc启动)

scp -r /xxx/soft/commons-daemon-1.0.15-src slave3:/xxx/soft/

5. kadmin添加pricipal

kadmin.local
addpric -randkey root/[email protected]
addpric -randkey host/[email protected] xst -norandkey -k /var/kerberos/krb5kdc/keytab/root.keytab root/[email protected] host/[email protected]

6. 测试principal  

kinit -k -t /var/kerberos/krb5kdc/keytab/root.keytab root/[email protected]

7. 将keytab同步其他服务器

scp /var/kerberos/krb5kdc/keytab/root.keytab slave3:/var/kerberos/krb5kdc/keytab/
scp /var/kerberos/krb5kdc/keytab/root.keytab master2:/var/kerberos/krb5kdc/keytab/
scp /var/kerberos/krb5kdc/keytab/root.keytab slave2:/var/kerberos/krb5kdc/keytab/

8. 启动datanode

./sbin/start-secure-dns.sh

9. 启动nodemanage

./sbin/yarn-daemon.sh start nodemanager

10. 验证

[root@slave3 ~]# hadoop fs -put ./installweb-fix.sh hdfs://ns/
[root@slave3 ~]# hadoop fs -ls /
Found 2 items
-rw-r--r-- 2 root supergroup 1366 2017-09-07 00:48 /README.txt
-rw-r--r-- 2 root supergroup 445 2017-09-08 11:28 /installweb-fix.sh

  

datanode扩容步骤-LMLPHP

  

  

  

  

  

  

  

05-11 20:48