微服务之zipkin、sentinel安装部署

zipkin安装部署

1、下载zipkin安装包,下载url如下https://search.maven.org/remote_content?g=io.zipkin.java&a=zipkin-server&v=LATEST&c=exec

2、如果是自己指定的用户名和密码可以参考下面的启动命令,Zipkin链路追踪

[root@manage-host conf]# java -jar zipkin-server-2.12.9-exec.jar --zipkin.collector.rabbitmq.addresses=localhost --zipkin.collector.rabbitmq.virtual-host=/mq --zipkin.collector.rabbitmq.username=mq --zipkin.collector.rabbitmq.password=123456

3、通过http://localhost:9411/zipkin/查看默认端口是9411

4、创建zipkin服务

[root@manage-host zipkin]# vim /usr/lib/systemd/system/zipkin.service
[Unit]
Description=Zipkin
After=network.target

[Service]
Type=simple
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=zipkin
User=root
WorkingDirectory=/home/gridcloud/zipkin/
ExecStart=/home/deploy/java8/bin/java -jar /home/gridcloud/zipkin/zipkin-server-2.12.9-exec.jar --zipkin.collector.rabbitmq.addresses=localhost --zipkin.collector.rabbitmq.virtual-host=/gridcloud --zipkin.collector.rabbitmq.username=mq --zipkin.collector.rabbitmq.password=123456
KillMode=process
TimeoutStopSec=60
Restart=on-failure
RestartSec=5
RemainAfterExit=no

[Install]
WantedBy=multi-user.target

 刷新系统服务

[root@manage-host zipkin]# systemctl daemon-daemon

启动重启和停止服务

启动
[root@manage-host zipkin]# systemctl start zipkin

停止
[root@manage-host zipkin]# systemctl stop zipkin

重启
[root@manage-host zipkin]# systemctl restart zipkin

sentinel安装部署 

1、安装包下载

[root@manage-host sentinel]#  wget https://github.com/alibaba/Sentinel/releases/download/1.7.2/sentinel-dashboard-1.7.2.jar

2、启动服务

[root@manage-host sentinel]# java -Dserver.port=8021 -Dcsp.sentinel.dashboard.server=localhost:8021 -jar /home/gridcloud/sentinel/sentinel-dashboard-1.7.2.jar > /home/gridcloud/sentinel/sentinel-dashboard.log &

3、访问服务默认登陆账号密码都是sentinel

4、制作服务 

[root@manage-host sentinel]# vim /usr/lib/systemd/system/sentinel.service
[Unit]
Description=Sentinel
After=network.target

[Service]
Type=simple
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=sentinel
User=root
WorkingDirectory=/home/deploy/sentinel/
ExecStart=/home/deploy/java8/bin/java -Dserver.port=8021 -Dcsp.sentinel.dashboard.server=localhost:8021 -jar /home/gridcloud/sentinel/sentinel-dashboard-1.7.2.jar
KillMode=process
TimeoutStopSec=60
Restart=on-failure
RestartSec=5
RemainAfterExit=no

[Install]
WantedBy=multi-user.target 

5、启动停止重启服务

启动
[root@manage-host sentinel]# systemctl start sentinel

停止
[root@manage-host sentinel]# systemctl stop sentinel

重启
[root@manage-host sentinel]# systemctl restart sentinel

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章