Tongweb7049+TongRDS2214-2216+THS6010-6012 开机自启动(by lqw)

原理

配置rc.local(这个网上有很多示范,为了方便使用,在这里总结一下各个产品的配置)

Tongweb7049

Tongweb7049 本身自带开机自启动脚本(bin目录下的installxxx.sh),但是有时执行失败的话,可以参考这个。

bash 复制代码
chmod +x /etc/rc.d/rc.local
chmod 755 /etc/rc.d/rc.local

su - root -c "cd tongweb安装目录的bin目录;./startservernohup.sh",例如:

注意:

1.把root替换为tongweb安装目录所属用户。

2.startservernohup.sh这个脚本记得给执行权限。

TongRDS2214-2216

bash 复制代码
在/etc/rc.d/rc.local文件中加入TongRDS的启动命令,rc.local要有x权限,相关安装目录请自行替换并测试。

chmod +x /etc/rc.d/rc.local
chmod 755 /etc/rc.d/rc.local
#启动管理控制台(如果没有可以不添加)
su - root -c  "cd /home/tongweb/TongRDS/console/bin;nohup ./console.sh start >/dev/null &"
#启动节点管理器,(如果没有可以不添加)
su - root -c  "cd /home/tongweb/TongRDS/node-mgr;nohup ./probe.sh start >/dev/null &"
#启动中心服务
su - root -c  "cd /home/tongweb/TongRDS/console/apps/center89/bin; nohup ./StartCenter.sh >/dev/null &"
#启动节点
su - root -c  "cd /home/tongweb/TongRDS/node-mgr/apps/node1/bin;nohup ./StartServer.sh >/dev/null &"
#启动哨兵节点,如果没有可以不添加
su - root -c  "cd /home/tongweb/TongRDS/console/apps/sb01/bin;nohup ./StartServer.sh >/dev/null &"

注意:

1.把root替换为trds安装目录所属用户。

2.上述涉及的脚本记得给执行权限。

THS6010-6012

bash 复制代码
chmod +x /etc/rc.d/rc.local
chmod 755 /etc/rc.d/rc.local

#启动节点
su - root -c  "cd /opt/THS/bin; ./start.sh"
#启动agent(没有的话可以不用配)
su - root -c  "cd /opt/THS/bin; ./startAgent.sh"
#启动HA(没有的话可以不用配)
su - root -c  "cd /opt/THS/bin; ./startHA.sh"
相关推荐
C_心欲无痕12 小时前
ts - tsconfig.json配置讲解
linux·前端·ubuntu·typescript·json
冰西瓜60012 小时前
国科大2025操作系统高级教程期末回忆版
linux
sunfove13 小时前
光网络的立交桥:光开关 (Optical Switch) 原理与主流技术解析
网络
HIT_Weston13 小时前
93、【Ubuntu】【Hugo】搭建私人博客:面包屑(一)
linux·运维·ubuntu
cuijiecheng201813 小时前
Linux下Beyond Compare过期
linux·运维·服务器
HIT_Weston14 小时前
92、【Ubuntu】【Hugo】搭建私人博客:侧边导航栏(六)
linux·运维·ubuntu
CodeAllen嵌入式14 小时前
Windows 11 本地安装 WSL 支持 Ubuntu 24.04 完整指南
linux·运维·ubuntu
期待のcode14 小时前
前后端分离项目 Springboot+vue 在云服务器上的部署
服务器·vue.js·spring boot
AI 智能服务14 小时前
第6课__本地工具调用(文件操作)
服务器·人工智能·windows·php
码农小韩15 小时前
基于Linux的C++学习——指针
linux·开发语言·c++·学习·算法