164 字
1 分钟
CentOS下安装Sentinel
2025-01-27

前言#

Sentinel被称为分布式系统的流量防卫兵,这里主要讲的是CentOS下如何安装Sentinel。

下载Sentinel#

Sentinel的安装非常简单,只需要去官网下载好对应的可执行jar包

image-20200822150208675

然后在配置启动脚本和关闭脚本,同时设置启动端口号8070

启动脚本:startup.sh

#!/bin/bash
nohup java -jar sentinel-dashboard-1.8.0.jar --server.port=8070 > catalina.out 2>&1 &

关闭脚本:shutdown.sh

#!/bin/bash
PID=$(ps -ef | grep sentinel-dashboard-1.8.0.jar | grep -v grep | awk '{ print $2 }')
if [ -z "$PID" ]
then
echo Application is already stopped
else
echo kill $PID
kill $PID
fi

启动成功后,访问地址:http://youip:8070,即可打开sentinel的管理页面

image-20200822151430102

输入sentinel sentinel进入即可

CentOS下安装Sentinel
http://localhost:4321/posts/linux/centos下安装sentinel/
发布于
2025-01-27
许可协议
CC BY-NC-SA 4.0