zoukankan      html  css  js  c++  java
  • zookeeper、redis、kafka、nacos常用命令总结

    zookeeper、redis、kafka、nacos常用命令总结

    NOTE:下列文中localhost均可用IP

    - 中间件
    - zookeeper
    - 占用端口
    - 21810
    - 启动命令
    - cd /opt/china/zookeeper-3.4.12/bin
    - ./zkServer.sh start
    - 连接命令
    - ./zkCli.sh -server localhost:21810
    - 查看节点
    - ls /dubbo/com.test.china.demo.services.IDemoService/providers
    - kafka
    - 占用端口
    - 9095
    - 问题
    - Connection to node -1 could not be established. Broker may not be available.
    - 解决
    - vi ../config/server.properties
    - listeners=PLAINTEXT://localhost:9095
    - advertised.listeners=PLAINTEXT://localhost:9095
    - 启动命令
    - cd /opt/china/kafka_2.12-2.1.0/bin
    - ./kafka-server-start.sh ../config/server.properties &
    - nohup ./kafka-server-start.sh ../config/server.properties 1>/dev/null 2>&1 & 常驻内存启动
    - 查看topic列表
    - ./kafka-topics.sh --list --zookeeper localhost:21810
    - 创建topic,1个分区
    - ./kafka-topics.sh --create --zookeeper localhost:21810 --replication-factor 1 --partitions 1 --topic demo
    - 查看topic
    - ./kafka-topics.sh --describe --zookeeper localhost:21810 --topic demo
    - 生产消息
    - ./kafka-console-producer.sh --broker-list localhost:9095 --topic demo
    - 消费消息
    - ./kafka-console-consumer.sh --bootstrap-server localhost:9095 --topic sxhdc --partition 0 --from-beginning
    - ./kafka-console-consumer.sh --bootstrap-server localhost:9095 --topic sxhdc --partition 0 --offset 5
    - 查看消费者组列表
    - ./kafka-consumer-groups.sh --bootstrap-server localhost:9095 --list
    - 查看消费者组的消费情况
    - ./kafka-consumer-groups.sh --bootstrap-server localhost:9095 --group topic_group_test --describe
    - reids
    - 占用端口
    - 6379、6380、6381
    - 集群创建
    - cd /opt/china/redis-5/bin
    - ./redis-cli --cluster create localhost:6379 localhost:6380 localhost:6381
    - 测试
    - ./redis-cli -c -p 6379 -h localhost
    - ./redis-cli -c -p 6381 -h localhost
    - nacos
    - 占用端口
    - 8848
    - 启动命令
    - ./startup.sh -m standalone &

    知人者智,自知者明,胜人者有力,自胜者强。
  • 相关阅读:
    .NET 2.0 SqlDependency快速上手指南
    将VS2005中文180天试用版升级到正式版的方法
    打包,并自动安装SQL数据库
    数字签证控件网马生成器制作工具
    有人写的批处理,学习一下
    ASP.NET(C#)优秀网站
    打开,另存为,属性,打印等14个JS代码
    数据库通用连接类
    网站排名查询(Alexa中文版)
    sql中取得当前月的第一天
  • 原文地址:https://www.cnblogs.com/nanfengxiangbei/p/15599493.html
Copyright © 2011-2022 走看看