Build an open source project 14 – install and deploy Kafka and download ruoyi

Time:2020-11-25

1、 Install and deploy message queue Kafka

1. Prepare zookeeper service first

  • Kafka is dependent on zookeeper, so run zookeeper first.
  • Start the dependency first, and then install the packagekafka_2.12-2.5.0.tazput to/rootDirectory, and unzip to a new directory
[[email protected] ~]# cd /usr/local/zookeeper/apache-zookeeper-3.6.1-bin/bin/
[[email protected] bin]# ./zkServer.sh start
[[email protected] bin]# cd /usr/local
[[email protected] local]# mkdir kafka
[[email protected] local]# cd kafka/
[[email protected] kafka]# tar -zxvf /root/kafka_2.12-2.5.0.tgz -C ./
  • Create a new logs directory, and then configure the path of the directory to Kafka’s configuration file
[[email protected] kafka_2.12-2.5.0]# mkdir logs
[[email protected] kafka_2.12-2.5.0]# cd config/
[[email protected] config]# vim server.properties
  • Just modify it log.dirs that will do
log.dirs=/usr/local/kafka/kafka_2.12-2.5.0/logs
  • In addition, Kafka is started in the background, and if necessary, start-daemonParameters.
[[email protected] config]# cd ..
[[email protected] kafka_2.12-2.5.0]# ./bin/kafka-server-start.sh ./config/server.properties

14.1

  • Next, let’s verify and create aruigegeOftopicAfter the creation, use the command to list the existing onestopiclist
[[email protected] kafka_2.12-2.5.0]# ./bin/kafka-topics.sh --create --bootstrap-server localhost:9092 --replication-factor 1 --partitions 1 --topic ruigege
[[email protected] kafka_2.12-2.5.0]# ./bin/kafka-topics.sh --list --bootstrap-server localhost:9092
  • Next, create a producer to produce messages on the topic on Ruige
[[email protected] kafka_2.12-2.5.0]# ./bin/kafka-console-producer.sh --bootstrap-server localhost:9092 --topic ruigege
[[email protected] kafka_2.12-2.5.0]# ./bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic ruigege
  • Now that we’ve finally deployed these tools, let’s start building an open source project that separates the front and back ends

2、 Build an open source project

  • Select an open source project ruoyi on the code cloud
[[email protected] ~]# mkdir project
[[email protected] ~]# cd project/
[[email protected] project]# git clone https://gitee.com/y_project/RuoYi-Vue.git

3、 Source code:

  • Build an open source project 14 – install, deploy and download Kafka ruoyi.md
  • https://github.com/ruigege66/Linux/blob/master/ Build an open source project 14 – install, deploy and download Kafka ruoyi.md
  • CSDN:https://blog.csdn.net/weixin_44630050
  • Blog Garden: https://www.cnblogs.com/ruigege0000/
  • Welcome to WeChat official account: Fourier transform, personal account, for technical exchange only.
    100.0