161人大金仓数据库授权文件过期处理步骤:
1)编写脚本
cat <<EOF>> /usr/local/bin/mltstart.sh
#!/bin/bash
date -s "2021-06-12 11:13:12"
service kingbase8d start
cd /opt/TongWeb7.0/bin
./startservernohup.sh
EOF
2)添加至rc.local
chmod +x /usr/local/bin/mltstart.sh
cat <<EOF>> /etc/rc.local
/bin/bash /usr/local/bin/mltstart.sh >/dev/null 2>/dev/null
EOF
[root@jg01 ~]# tail -n 1 /etc/rc.local
/bin/bash /usr/local/bin/mltstart.sh>/dev/null 2>/dev/null
3)重启验证
159服务启动,恢复快照到20210129
1)编写脚本
cd /usr/local/bin
vi tyystart.sh
#!/bin/bash
if [ $# -lt 1 ]
then
echo "No Args Input..."
exit ;
fi
case $1 in
"start")
echo " =================== 启动依赖服务 ==================="
echo " --------------- 启动 nginx ---------------"
cd /usr/local/nginx/sbin
./nginx
sleep 1m
echo " --------------- 启动 redis ---------------"
cd /usr/local/redis-6.0.5/src/
./redis-server ../redis.conf
sleep 1m
echo " --------------- 启动 nacos ---------------"
cd /usr/local/nacos/bin
sh startup.sh -m standalone
sleep 1m
echo " --------------- 启动 mq ---------------"
cd /opt/tyy-workspace
./start-xxl-mq.sh
sleep 1m
echo " --------------- 启动OA系统服务 ---------------"
cd /opt/tyy-workspace/
./start-client-org-sv.sh
./start-process-sv.sh
./start-platform-sv.sh
./start-doc.sh
./start-msg-sv.sh
./start-oa-sv.sh
./start-fs.sh
sleep 1m
echo " --------------- 启动OA系统服务(需要服务启动后,再启动接口) ---------------"
./start-platform-api.sh
./start-oa-api.sh
;;
"stop")
echo "=======随操作系统关机自动关闭======"
;;
*)
echo "Input Args Error..."
;;
esac
2)添加至rc.local
chmod +x tyystart.sh
tyystart.sh start --测试
cat <<EOF>> /etc/rc.local
/bin/bash /usr/local/bin/tyystart.sh start >/dev/null 2>/dev/null
EOF
[root@jg01 ~]# tail -n 1 /etc/rc.local
/bin/bash /usr/local/bin/tyystart.sh start >/dev/null 2>/dev/null
3)重启验证
自启动脚本示例
最新推荐文章于 2024-03-19 08:00:00 发布