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
Sentinel 基本介绍
参考链接: https://hellojava.cc/article/371
124 篇文章
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!