Sentinel的启动 运行,进程守护

Sentinel的启动 运行,进程守护,sprinboot2.x 集成Sentinel的启动 运行,进程守护。

dashboard守护进程启动


新建sh脚本

vim /home/appdev/startSentinel.sh

脚本中填入

#!/bin/bash
java  -jar /home/appdev/sentinel-dashboard.jar


赋予权限

chmod 777 /home/appdev/startSentinel.sh

 创建守护进程

vim /lib/systemd/system/sentinel-dashboard.service

文件中填入

[Unit]
Description=nginx
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=simple 
ExecStart=/opt/sentinel-dashboard/startup.sh 
Restart=always 
PrivateTmp=true
[Install]
WantedBy=multi-user.target

赋予权限

chmod 777 /lib/systemd/system/sentinel-dashboard.service

启用服务

systemctl enable sentinel-dashboard.service
systemctl daemon-reload

运行

systemctl start sentinel-dashboard.service

查看状态

systemctl status sentinel-dashboard.service

查看进程和端口

ps -ef|grep sentinel-dashboard
netstat -anltp|grep 8081
netstat -anltp|grep 8081


attachments-2019-05-IFpHmvS65cf09a4d94629.png


Sentinel 基本介绍


参考链接: https://hellojava.cc/article/371



  • 发表于 2019-05-31 11:07
  • 阅读 ( 6738 )
  • 分类:Java

0 条评论

请先 登录 后评论
不写代码的码农
威猛的小站长

124 篇文章

作家榜 »

  1. 威猛的小站长 124 文章
  2. Jonny 65 文章
  3. 江南烟雨 36 文章
  4. - Nightmare 33 文章
  5. doublechina 31 文章
  6. HJ社区-肖峰 29 文章
  7. 伪摄影 22 文章
  8. Alan 14 文章