Enable Kerberos on Ambari
Install a new MIT KDC
Install the KDC server
Install a new version of the KDC server
1
yum install -y krb5-server krb5-libs krb5-workstation
Update the KDC server configuration file
1
vi /etc/krb5.conf
Update the name of realms and ensure the value of “renew_lifetime” is “7d”
1
2
3
4
5
6
7[libdefaults]
default_realm = BIGDATA.COM
dns_lookup_realm = false
dns_lookup_kdc = false
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = trueUpdate the item “realms”
1
2
3
4
5[realms]
BIGDATA.COM = {
kdc = master1.bigdata.com
admin_server = master1.bigdata.com
}Update the item “domain_realm”
1
2
3[domain_realm]
.bigdata.com = BIGDATA.COM
bigdata.com = BIGDATA.COM
Create the Kerberos database
1 | kdb5_util create -s |
Start the KDC
1 | /etc/rc.d/init.d/krb5kdc start |
Set up the KDC server to auto-start on boot.
1 | chkconfig krb5kdc on |
Create a Kerberos Admin
You need to create an admin account, then provide this admin credentials for enabling Kerberos on Ambari.
Create a KDC admin
1
kadmin.local -q "addprinc admin/admin"
Ensure this admin account include the authorization to enter into the specific realms
1
vi /var/kerberos/krb5kdc/kadm5.acl
1
*/admin@BIGDATA.COM *
Restart the kadmin process
1
/etc/rc.d/init.d/kadmin restart
Install the JCE
If you already use the JDK that contains the JCE, you ought to skip this step.
Download the specific version of the JCE file
For Oracle JDK 1.8:
1
http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html
For Oracle JDK 1.7:
1
http://www.oracle.com/technetwork/java/javase/downloads/jce-7-download-432124.html
Add the JCE file to the JDK installation direction
1
$JAVA_HOME/jre/lib/security/
Enabling the Kerberos
- Enter into the configuration of the kerberos
- Choose the type of KDC
- Configure the Kerberos
- Install and test the Kerberos client
- Configure identities
You can just click the button “next”.
- Confirm Configuration
You need to download the CSV file that contains a list of the principals and keytabs.
- Stop services
- Kerberos cluster
- Start and test services