在 CentOS 上“dopra”通常不是系统自带的标准服务名,常见情况有两种,你看看属于哪一种:
如果它是通过 systemctl 管理的服务,可直接用:
# 重启
systemctl restart dopra
# 查看状态
systemctl status dopra
# 设置开机自启(可选)
systemctl enable dopra
如果提示 Unit dopra.service not found,说明它不是 systemd 服务,看下面。
如果是直接运行的程序(如 Java、Python、二进制):
# 查找进程
ps -ef | grep dopra
# 杀掉进程
kill -9 <PID>
# 再重新启动(根据实际启动方式)
./dopra
# 或
nohup ./dopra > dopra.log 2>&1 &
如果用了 supervisor:
supervisorctl restart dopra
docker restart dopra
如果你能补充一下:
我可以给你更精确的重启方式。