zipkin server部署

こ雲淡風輕ζ 提交于 2020-03-10 19:33:16

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
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!