简体   繁体   English

如何使用Kerberos安装librdkafka?

[英]How to install librdkafka with Kerberos?

So I am trying to write a script where the data comes from a database and then gets published into a kafka topic. 因此,我试图编写一个脚本,其中数据来自数据库,然后发布到kafka主题中。 I am using the confluent-kafka due to its speed. 由于速度快,我正在使用confluent-kafka
The kafka has kerberos configured thus, I have to enable it in my producer. kafka已配置了kerberos ,我必须在生产者中启用它。 I have the keytab and the required config parameters. 我有keytab和必需的配置参数。

As far as I understand I need to manually install librdkafka + it's dependencies and then install the confluent-kafka from source. 据我了解,我需要手动安装librdkafka +它的依赖项,然后从源代码安装confluent-kafka

So till now I have installed the following dependencies: 因此,到目前为止,我已经安装了以下依赖项:

1. yum install cyrus-sasl.
2. yum install cyrus-sasl-devel
3. yum install cyrus-sasl-lib
4. yum install cyrus-sasl-gssapi
5. yum install openssl-devel
6. yum install openssl

When I try to execute the following command yum install librdkafka it gives me as error: 当我尝试执行以下命令yum install librdkafka时,出现错误:

No package librdkafka. Error: Nothing to do

I was hoping this would install librdkafka and then I could execute the following command pip install --no-binary :all: confluent-kafka and get the confluent-kafka working with kerberos . 我希望这将安装librdkafka ,然后我可以执行以下命令pip install --no-binary :all: confluent-kafka并使confluent-kafkakerberos一起使用。

  1. Could anyone tell me if I am doing this right as I haven't been able to find any guide regarding this. 谁能告诉我我是否这样做正确,因为我找不到任何有关此问题的指南。
  2. I may also be missing some dependencies, if that is the case feel free to point it out. 如果是这种情况,我可能还会缺少一些依赖项,请随时指出。
  3. Lastly, if my procedure till now or for the future is flawed, do point it out and please advise how to go about it. 最后,如果我到目前为止或将来的程序有缺陷,请指出来,并建议如何处理。

System Info: 系统信息:

OS: rhel-7-server 操作系统:rhel-7-server

PS If there are any additional info required, let me know I will update the post accordingly. 附注:如果需要任何其他信息,请告诉我,我将相应地更新该帖子。

The latest version of librdkafka is not generally available in RHEL, you should use the Confluent RPM repository to get the most up to date version. 最新版本的librdkafka在RHEL中通常不可用,您应该使用Confluent RPM存储库以获取最新版本。

  1. Add the Confluent RPM repository 添加Confluent RPM存储库
  2. Install librdkafka devel packages: yum install librdkafka-devel 安装librdkafka devel软件包: yum install librdkafka-devel
  3. Build and install the confluent-kafka-python client with python setup.py install or pip install . 使用python setup.py installpip install .构建并安装confluent-kafka-python客户端pip install .

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM