微服務之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

 

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