zipkin server部署
1 、创建相关目录
mkdir -p /opt/server/zipkin
mkdir -p /data/logs
2、安装jdk1.8
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
rpm -ivh jdk-8u231-linux-x64.rpm
3、下载安装包
cd /opt/server/zipkin
wget https://dl.bintray.com/openzipkin/maven/io/zipkin/java/zipkin-server/2.12.9/zipkin-server-2.12.9-exec.jar
4、编写启动脚本
cd /opt/server/zipkin
vim start_zipkin.sh
#!/bin/bash
nohup java -DKAFKA_BOOTSTRAP_SERVERS=kafka1:9092,kafka2:9092,kafka3:9092 \
-DSTORAGE_TYPE=elasticsearch \
-DES_HOSTS=http://es1:9200,http://es2:9200,es3:9200 \
-jar /opt/server/zipkin/zipkin-server-2.12.9-exec.jar >> /data/logs/zipkin.log 2>&1
-
KAFKA_BOOTSTRAP_SERVERS:kafka broker地址
-
STORAGE_TYPE:数据存储类型,这里我们选择elasticsearch
-
ES_HOSTS :elasticsearch的地址
赋予脚本可执行权限
chmod +x start_zipkin.sh
5、添加zipkin为服务
cd /usr/lib/systemd/system/
vim zipkin.service
[Unit]
Description=zipkin
After=network.target
[Service]
Type=simple
User=root
Group=root
ExecStart=/opt/server/zipkin/start_zipkin.sh
KillSignal=SIGTERM
Restart=on-failure
[Install]
WantedBy=multi-user.target
6、启动服务
systemctl start zipkin
7、查询日志
tailf /data/logs/zipkin.log
来源:CSDN
作者:huchao_lingo
链接:https://blog.csdn.net/huchao_lingo/article/details/104778310