启动卡夫卡服务器永久 [英] Starting Kafka Server Permanently

查看:189
本文介绍了启动卡夫卡服务器永久的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装卡夫卡在Amazon EC2实例。

I have setup Kafka on Amazon EC2 instance.

我已经做了以下顺序如下所示: (1)SSH连接实例 (2)开始Zookeper (3)开始卡夫卡 (4)执行生产者和消费者的方案。

I have done the following in below order: (1) SSH into the Instance (2) Start Zookeper (3) Start Kafka (4) Execute Producer and Consumer Programs.

一切工作正常,直到这里。然而,一旦我结束关于这一点我已经开始卡夫卡的SSH窗口,卡夫卡服务停止。我无法再执行生产者和消费者的方案。

Everything is working fine till here. However once I close the SSH window on which I have started Kafka, the Kafka service stops. I can no longer execute Producer and Consumer programs.

我怎么能有卡夫卡服务器永久地为所有的请求,我关闭SSH窗口,即使经过。

How can I have the Kafka Server permanently up for all requests, even after I close the SSH window.

感谢你。

推荐答案

的nohup 是需要在命令的开头,这样的输出是不是在屏幕上,而是在文件。此外&安培; 是需要在命令年底开始在后台服务器:

nohup is required at the beginning of command, so that output is not on screen, but in file. Also & is required at the end of command to start the server in background:

斌/ zookeeper-server-start.sh配置/ zookeeper.properties

bin/zookeeper-server-start.sh config/zookeeper.properties

斌/ kafka-server-start.sh配置/ server.properties

bin/kafka-server-start.sh config/server.properties

将变为:

的nohup斌/ zookeeper-server-start.sh配置/ zookeeper.properties&安培;

nohup bin/zookeeper-server-start.sh config/zookeeper.properties &

的nohup斌/ kafka-server-start.sh配置/ server.properties和放大器;

nohup bin/kafka-server-start.sh config/server.properties &

这篇关于启动卡夫卡服务器永久的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆