kafka 安裝
下載kafka源碼拷貝到/usr/local,添加path
安裝JDK
安裝
linux 下載rpm包
http://www.oracle.com/technetwork/java/javase/downloads/jdk10-downloads-4416644.html
執(zhí)行rpm -iv jdk-10.0.2_linux-x64_bin.rpm
驗證
$java -version
java version "10.0.2" 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
啟動kafka
- 啟動zookeeper /usr/local/kafka/bin/zookeeper-server-start.sh /usr/local/kafka/config/zookeeper.properties &
錯誤記錄
啟動kafka server錯誤
java.net.UnknownHostException: bj1-10-112-179-12: bj1-10-112-179-12: Name or service not known
- 原因
意思是找不到域名bj1-10-112-179-12芬首,用hostname查看本地的主機名是否和bj1-10-112-179-12一樣赴捞, - 解決
將本機地址和主機名的映射添加到/etc/hosts文件中
例如: 123.1.1.43 bj1-10-112-179-12