您的位置:首页 > 财经 > 产业 > 快看点媒体平台_如何做电商直播_学生没钱怎么开网店_公司网页设计模板

快看点媒体平台_如何做电商直播_学生没钱怎么开网店_公司网页设计模板

2024/10/5 17:20:09 来源:https://blog.csdn.net/qq_45782319/article/details/142413880  浏览:    关键词:快看点媒体平台_如何做电商直播_学生没钱怎么开网店_公司网页设计模板
快看点媒体平台_如何做电商直播_学生没钱怎么开网店_公司网页设计模板

1、/etc/rc.local 方式

echo 'su - gbase -c "gcware_services all restart;gcluster_services all restart"' >> /etc/rc.local
chmod +x /etc/rc.local

2、/etc/init.d 启动服务(测试于centos7)【对于953,可以拆分成两个服务GCluster、GCware】

# 注意文件加上可执行权限,比如chmod a+x GBase8aBoot

[root@node1 init.d]# cat /etc/init.d/GBase8aBoot
#!/bin/sh
#
### BEGIN INIT INFO
# Provides:                    GBase
# Required-Start:       $network
# Should-Start:         $syslog
# Required-Stop:        $network
# Default-Start:                2 3 4 5
# Default-Stop:                 0 1 6
# Short-Description:    GBase 8a Cluster MPP.
# Description:          Provide MPP Database service
### END INIT INFO
#LOG_PATH=/var/log/GBase8aBoot.logfunction is_OK()
{if [ $RETVAL -eq 0 ] ;thenecho "OK"elseecho "FAIL"fi
}RETVAL=0# See how we were called.
case "$1" instart)date >> $LOG_PATHecho -n "Starting gbase: "su - gbase -c"gcware_services all start;gcluster_services all start" >> $LOG_PATHRETVAL=$?echo `is_OK`;;stop)date  >> $LOG_PATHecho -n "Stopping gbase: "su - gbase -c"gcware_services all stop;gcluster_services all stop"  >> $LOG_PATHRETVAL=$?echo `is_OK`;;restart)date  >> $LOG_PATHecho -n "Restarting gbase: "su - gbase -c"gcware_services all restart;gcluster_services all restart"  >> $LOG_PATHRETVAL=$?echo `is_OK`;;status)su - gbase -c"gcware_services all info;gcluster_services all info"RETVAL=$?;;*)echo "Usage: $0 {start|stop|restart|status}"exit 1
esacexit $RETVAL

# 检查命令是否正常

[root@node1 init.d]# service GBase8aBoot status
/opt/192.168.140.68/gcware/sbin/gcware is stopped
/opt/192.168.140.68/gcluster/server/bin/gclusterd is stopped
/opt/192.168.140.68/gcluster/server/bin/gcrecover is stopped
/opt/192.168.140.68/gnode/server/bin/gbased is stopped
/opt/192.168.140.68/gnode/server/bin/gc_sync_server is stopped

# 添加到开机自启动

# chkconfig 开机的时候传递一个start的值,作为$1

# chkconfig 关机的时候传递一个stop的值,作为$1

[root@node1 init.d]# chkconfig --add GBase8aBoot
[root@node1 init.d]# chkconfig --list|grep GBase8aBoot注:该输出结果只显示 SysV 服务,并不包含
原生 systemd 服务。SysV 配置数据
可能被原生 systemd 配置覆盖。要列出 systemd 服务,请执行 'systemctl list-unit-files'。查看在具体 target 启用的服务请执行'systemctl list-dependencies [target]'。GBase8aBoot     0:关    1:关    2:开    3:开    4:开    5:开    6:关

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com