centos7 5安裝kafka(支援外部連線)

2021-10-08 13:39:48 字數 991 閱讀 4109

cd . ./

mkdir kafka-logs(建立配置檔案中提到的log目錄)

開始啟動kafka

建立乙個訊息佇列

建立乙個消費者

新開視窗,進入kafka目錄,建立乙個生產者

此時開啟剛才建立消費者的視窗,會看到剛才的輸入訊息被消費了

到現在,kafka單機訊息佇列基本的配置和執行都是正常的,單機環境配置基本上就是這些

同時可用jps檢視當前伺服器上執行的服務情況

常用命令

檢視策列:bin/kafka-configs.sh --zookeeper --zookeeper ip:2181 --describe --entity-

type topics --entity-name test2m

後台啟動: nohup bin/kafka-server-

start

.sh config/server.properties >> /dev/null &

訊息佇列:bin/kafka-topics.sh --create --replication-factor 1 --partitions 1 --topic test2m --zookeeper ip:2181

消費者:bin/kafka-console-consumer.sh --zookeeper ip:2181 --topic test2m

生產者: bin/kafka-console-producer.sh --broker-list ip:9092 --topic test2m

topic 查詢:bin/kafka-topics.sh --list --zookeeper ip:2181

kafka必須配置引數delete.topic.enable=true

topic 刪除:.

/bin/kafka-topics.sh --zookeeper ip:2181 --delete --topic topicname

CentOS 7 5 系統下安裝nginx

選擇你想要安裝的位址 cd usr local etc wget 安裝nginx執行庫 yum y install gcc gcc c automake autoconf libtool make yum y install pcre zlib openssl openssl devel 解壓ngi...

centos7 5 安裝於配置vsftpd

centos7.5 安裝於配置vsftpd 安裝vsftpd yum install y vsftpd 很順利 配置虛擬使用者登入 ftp服務一般不允許本地賬戶登入是為了提高安全性,建立ftp的使用者體系,稱之為虛擬使用者 1 建立虛擬使用者的專用目錄 mkdir home www zgy img ...

在Centos75安裝ftp服務

1.1 安裝vsftp,測試安裝的 vsftpd 的版本是 1.2 修改配置檔案 vi etc vsftpd vsftpd.conf 保證下面3項為yes 1.3 設定vsftpd開機啟動 systemctl enable vsftpd.service 1.4 啟動並檢視 vsftpd 服務狀態,s...