配置 GBase 8t 自动启动服务 (脚本)

本资料无预览

如感兴趣请 1 金币购买后下载

立即下载

资料简介:

脚本用于 GBase 8t 服务(service) 的 启动/停止/重启/强制重启/状态查看:

可以使用service命令的方式 启动 和 关闭数据库:

[root@localhost etc]# service gbase8t stop

Shutdown GBase 8t SERVER gbaseserver .  OK

[root@localhost etc]# service gbase8t start

Starting GBase 8t SERVER gbaseserver .  OK

[root@localhost etc]# service gbase8t status

GBase 8t SERVER gbaseserver is running.

[root@localhost etc]#

#############################################

#!/bin/bash

# chkconfig: 2345 20 81

# chkconfig --add gbase8t --level 2345

# Description: GBase 8t service

使用方法:

1) 使用root用户将文件拷贝至目录 /etc/init.d/

2) 执行命令 chmod +x /etc/init.d/gbase8t

3) 执行命令 chkconfig --add gbase8t --level 2345

4) 按照实例信息修改脚本中的环境变量

语法:  /etc/init.d/gbase8t {start|stop|restart|force-restart|status}

[root@localhost etc]# /etc/init.d/gbase8t

Usage: /etc/init.d/gbase8t {start|stop|restart|force-restart|status}

[root@localhost etc]# /etc/init.d/gbase8t stop

Shutdown GBase 8t SERVER gbaseserver .  OK

[root@localhost etc]# /etc/init.d/gbase8t start

Starting GBase 8t SERVER gbaseserver .  OK

[root@localhost etc]# /etc/init.d/gbase8t restart

Shutdown GBase 8t SERVER gbaseserver .  OK

Starting GBase 8t SERVER gbaseserver .  OK

[root@localhost etc]# /etc/init.d/gbase8t force-restart

Shutdown GBase 8t SERVER gbaseserver Force.   OK

Starting GBase 8t SERVER gbaseserver .  OK

[root@localhost etc]# /etc/init.d/gbase8t status

GBase 8t SERVER gbaseserver is running.

[root@localhost etc]# /etc/init.d/gbase8t stop

Shutdown GBase 8t SERVER gbaseserver .  OK

[root@localhost etc]# /etc/init.d/gbase8t status

GBase 8t SERVER gbaseserver is NOT running.

[root@localhost etc]#

2017-03-26
浏览1890
下载19

已下载用户的评价7.64分

您还未下载该资料,不能发表评价;
查看我的 待评价资源
carlbccarlbc   数据库管理员 , 银行2017-04-07
有用
这份资料很好

贡献者

antyison数据库运维工程师,南大通用
X社区推广