亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

安全模式下配置Hadoop身份驗證

小云
107
2023-10-11 10:04:43
欄目: 大數據

在安全模式下配置Hadoop身份驗證需要完成以下步驟:

  1. 生成Kerberos認證相關的密鑰和憑據:
kdb5_util create -s
ktadd -k /etc/security/keytabs/nn.service.keytab nn/hostname@REALM
ktadd -k /etc/security/keytabs/dn.service.keytab dn/hostname@REALM
ktadd -k /etc/security/keytabs/jhs.service.keytab jhs/hostname@REALM
ktadd -k /etc/security/keytabs/rm.service.keytab rm/hostname@REALM
ktadd -k /etc/security/keytabs/nm.service.keytab nm/hostname@REALM
ktadd -k /etc/security/keytabs/spnego.service.keytab HTTP/hostname@REALM
  1. 配置Kerberos客戶端:
vi /etc/krb5.conf
[libdefaults]
default_realm = REALM
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 86400
renew_lifetime = 604800
forwardable = true
default_tgs_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
default_tkt_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
permitted_enctypes = aes256-cts-hmac-sha1-96 rc4-hmac des-cbc-crc des-cbc-md5
udp_preference_limit = 1
[realms]
REALM = {
kdc = kdc-hostname:88
admin_server = kdc-hostname:749
}
[domain_realm]
.hostname = REALM
hostname = REALM
  1. 配置Hadoop客戶端:
vi $HADOOP_HOME/etc/hadoop/core-site.xml
<configuration>
<property>
<name>hadoop.security.authentication</name>
<value>kerberos</value>
</property>
<property>
<name>hadoop.security.authorization</name>
<value>true</value>
</property>
<property>
<name>hadoop.security.auth_to_local</name>
<value>RULE:[2:$1@$0](.*@REALM)s/@.*//DEFAULT/</value>
</property>
</configuration>
vi $HADOOP_HOME/etc/hadoop/hdfs-site.xml
<configuration>
<property>
<name>dfs.namenode.kerberos.principal</name>
<value>nn/hostname@REALM</value>
</property>
<property>
<name>dfs.namenode.keytab.file</name>
<value>/etc/security/keytabs/nn.service.keytab</value>
</property>
<property>
<name>dfs.datanode.kerberos.principal</name>
<value>dn/hostname@REALM</value>
</property>
<property>
<name>dfs.datanode.keytab.file</name>
<value>/etc/security/keytabs/dn.service.keytab</value>
</property>
</configuration>
vi $HADOOP_HOME/etc/hadoop/yarn-site.xml
<configuration>
<property>
<name>yarn.resourcemanager.keytab</name>
<value>/etc/security/keytabs/rm.service.keytab</value>
</property>
<property>
<name>yarn.resourcemanager.principal</name>
<value>rm/hostname@REALM</value>
</property>
<property>
<name>yarn.nodemanager.keytab</name>
<value>/etc/security/keytabs/nm.service.keytab</value>
</property>
<property>
<name>yarn.nodemanager.principal</name>
<value>nm/hostname@REALM</value>
</property>
</configuration>
vi $HADOOP_HOME/etc/hadoop/mapred-site.xml
<configuration>
<property>
<name>mapreduce.jobhistory.keytab</name>
<value>/etc/security/keytabs/jhs.service.keytab</value>
</property>
<property>
<name>mapreduce.jobhistory.principal</name>
<value>jhs/hostname@REALM</value>
</property>
</configuration>
  1. 啟動Kerberos并檢查是否成功:
kadmin.local
start

0
富裕县| 永济市| 中阳县| 阿拉善盟| 威宁| 边坝县| 潮安县| 兰考县| 东山县| 西乌| 深水埗区| 栾川县| 资讯| 辽宁省| 宁化县| 成都市| 涞水县| 南丰县| 永州市| 八宿县| 库尔勒市| 高阳县| 巩留县| 扎赉特旗| 伊春市| 天长市| 武宁县| 五常市| 东港市| 泾阳县| 通城县| 甘南县| 达州市| 平度市| 观塘区| 石城县| 区。| 政和县| 乌兰县| 石狮市| 西和县|