- Apache Kafka Quick Start Guide
- Raúl Estrada
- 299字
- 2021-07-02 14:26:53
Kafka installation
There are three ways to install a Kafka environment:
- Downloading the executable files
- Using brew (in macOS) or yum (in Linux)
- Installing Confluent Platform
For all three ways, the first step is to install Java; we need Java 8. Download and install the latest JDK 8 from the Oracle's website:
http://www.oracle.com/technetwork/java/javase/downloads/index.html
At the time of writing, the latest Java 8 JDK version is 8u191.
For Linux users :
- Change the file mode to executable as follows, follows these steps:
> chmod +x jdk-8u191-linux-x64.rpm
- Go to the directory in which you want to install Java:
> cd <directory path>
- Run the rpm installer with the following command:
> rpm -ivh jdk-8u191-linux-x64.rpm
- Add to your environment the JAVA_HOME variable. The following command writes the JAVA_HOME environment variable to the /etc/profile file:
> echo "export JAVA_HOME=/usr/java/jdk1.8.0_191" >> /etc/profile
- Validate the Java installation as follows:
> java -version
java version "1.8.0_191"
Java(TM) SE Runtime Environment (build 1.8.0_191-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
At the time of writing, the latest Scala version is 2.12.6. To install Scala in Linux, perform the following steps:
- Download the latest Scala binary from http://www.scala-lang.org/download
- Extract the downloaded file, scala-2.12.6.tgz, as follows:
> tar xzf scala-2.12.6.tgz
- Add the SCALA_HOME variable to your environment as follows:
> export SCALA_HOME=/opt/scala
- Add the Scala bin directory to your PATH environment variable as follows:
> export PATH=$PATH:$SCALA_HOME/bin
- To validate the Scala installation, do the following:
> scala -version
Scala code runner version 2.12.6 -- Copyright 2002-2018,
LAMP/EPFL and Lightbend, Inc.
To install Kafka on your machine, ensure that you have at least 4 GB of RAM, and the installation directory will be /usr/local/kafka/ for macOS users and /opt/kafka/ for Linux users. Create these directories according to your operating system.
推薦閱讀
- SQL Server 從入門到項目實踐(超值版)
- UI設計基礎培訓教程
- Facebook Application Development with Graph API Cookbook
- 程序員面試白皮書
- 軟件架構設計:大型網站技術架構與業務架構融合之道
- Web Scraping with Python
- C語言程序設計教程(第2版)
- TypeScript項目開發實戰
- JavaScript入門經典
- 利用Python進行數據分析(原書第3版)
- 單片機C語言程序設計實訓100例
- Python Data Structures and Algorithms
- SSM開發實戰教程(Spring+Spring MVC+MyBatis)
- Spring Boot+MVC實戰指南
- 從零開始:C語言快速入門教程