Ambari实现HTTPS登陆

本文详细介绍如何为Ambari Server启用HTTPS,包括生成自签名证书的步骤,并通过ambari-serversetup-security命令配置HTTPS,确保大数据集群管理的安全。

关于Ambari的安全、访问控制在这里有非常详细的介绍。

http://pivotalhd.docs.pivotal.io/docs/security-guide-ambari-2.1.2.html

另外还可以参考这一篇

https://community.hortonworks.com/articles/39865/enabling-https-for-ambariserver-and-troubleshootin.html

Ambari用来管理大数据集群非常的方便,但是默认只支持HTTP协议,需要手动安装、配置才能支持HTTPS协议。
步骤如下:
1、登陆到Ambari Server所在主机,依次执行如下命令

1)
openssl genrsa -out $wserver.key 2048
2)
openssl req -new -key $wserver.key -out $wserver.csr
3)
openssl x509 -req -days 365 -in $wserver.csr -signkey $wserver.key -out $wserver.crt

注:$wserver 就是Ambari Server 的host name

The certificate you use must be PEM-encoded, not DER-encoded. If you attempt to use a DER-encoded certificate, you see the following error:

unable to load certificate 140109766494024:error:0906D06C:PEM routines:PEM_read_bio:no start line:pem_lib.c :698:Expecting: TRUSTED CERTIFICATE

You can convert a DER-encoded certificate to a PEM-encoded certificate using the following command:

openssl x509 -in cert.crt -inform der -outform pem -out cert.pem

where cert.crt is the DER-encoded certificate and cert.pem is the resulting PEM-encoded certificate.

2、执行 ambari-server setup-security命令


    Select 1 for Enable HTTPS for Ambari server.

    Respond y to Do you want to configure HTTPS ?

    Select the port you want to use for SSL. The default port number is 8443.

    Provide the complete path to your certificate file ($wserver.crt from above) and private key file ($wserver.key from above).

    Provide the password for the private key.

    Start or restart the Server

    ambari-server restart
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值