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"
相关推荐
戴为沐1 天前
Linux内存扩容指南
linux
zylyehuo1 天前
Linux 彻底且安全地删除文件
linux
用户805533698032 天前
主线 U-Boot 上 RK3506:和闭源 rkbin 拔河的三个隐性契约
linux·嵌入式
用户034095297912 天前
linux fcitx 5 雾凇拼音 设置在中文输入法下仍然输入英文标点
linux
Web3探索者4 天前
可视化服务器管理和传统命令行区别是什么?新手教程:Linux 运维到底该用图形界面还是 SSH 命令行?
linux·ssh
zylyehuo4 天前
Linux系统中网线与USB网络共享冲突
linux
Sokach10155 天前
Linux Shell 脚本从零到能用:一个新手的一天学习总结
linux
AlfredZhao6 天前
Docker 容器时区不对,`timedatectl` 不存在怎么办?
linux·timezone
zzzzzz3107 天前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
XIAOHEZIcode7 天前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏