3.8 配置scala

下载,解压

wget https://downloads.lightbend.com/scala/2.13.0-M5/scala-2.13.0-M5.tgz

tar -zxvf scala-2.13.0-M2.tgz

mv scala-2.13.0-M5 /usr/local/scala

 

环境变量设置

sudo vi /etc/profile

#scala

export SCALA_HOME=/usr/local/scala

export PATH=${SCALA_HOME}/bin:$PATH

source /etc/profile

执行 scala 命令,输出以下信息,表示安装成功:

scala

 

 

3.9配置Kafka

解压文件,移动到约定目录,进入config配置文件server.properties

tar xf kafka_2.12-2.3.0.tgz

mv kafka_2.12-2.3.0 /usr/local/kafka

cd /usr/local/kafka/config

vim server.properties

修改第一处:

broker.id=0   

host.name=master   

#master节点为0slave11slave22

修改第二处:

log.dirs=/usr/local/kafka/logs

zookeeper.connect=master:2181,slave1:2181,slave2:2181

#规定日志路径,便于排错。

启动kafka,必须优先启动zookeeper

/usr/local/kafka/bin/kafka-server-start.sh -daemon /usr/local/kafka/config/server.properties