8s 自启动的两种方法
1、cd /home/gbasedbt
2、vi start.sh
添加如下内容
source /home/gbasedbt/profile.gbaseserver;
oninit -vy;
3、vi /etc/rc.local(文件需要执行权限)
添加如下内容
su - gbasedbt <<EOF
sh /home/gbasedbt/start.sh;
exit;
EOF
4、chmod 777 /etc/rc.local (文件执行权限)
详细步骤如下:
1.创建gbasedbtd.service文件
# vim /usr/lib/systemd/system/gbasedbtd.service
[Unit]
Description=GBase 8s Database Server v8.7 2.0.1a2_2
Documentation=file:/opt/gbase/release/en_us/0333
Wants=network-online.target
After=network.target network-online.target
[Service]
Type=oneshot
User=gbasedbt
Group=gbasedbt
RemainAfterExit=yes
EnvironmentFile=/etc/sysconfig/gbasedbtd_service
ExecStart=/opt/gbase/bin/oninit
ExecStop=/opt/gbase/bin/onmode -ky
#Restart=on-abort
[Install]
WantedBy=multi-user.target
2.创建gbasedbtd_service文件
里面的内容根据安装gbase 8s后自动生成的环境变量文件(/home/gbasedbt/profile.gbaseserver)进行修改
# vim /etc/sysconfig/gbasedbtd_service
GBASEDBTSERVER=gbaseserver
GBASEDBTDIR=/opt/gbase
GBASEDBTSQLHOSTS=/opt/gbase/etc/sqlhosts.gbaseserver
ONCONFIG=onconfig.gbaseserver
3.启动命令
systemctl daemon-reload
systemctl start gbasedbtd.service {启动gbasedbtd服务(数据库应未启动)}
systemctl status gbasedbtd.service
systemctl stop gbasedbtd.service
systemctl enable gbasedbtd.service (设置gbasedbtd服务随系统启动)
systemctl disable gbasedbtd.service (关闭gbasedbtd服务随系统启动)
热门帖子
- 12025-12-01浏览数:182762
- 22023-05-09浏览数:25056
- 42023-09-25浏览数:18525
- 52020-05-11浏览数:17528
2024-07-19 11:04:20 11567 11565 Archive started on rootdbs, sbspace01, datadbs01, llogdbs, plogdbs (Requested Level 0).
2024-07-19 11:04:20 11567 11565 Begin level 0 backup rootdbs.
2024-07-19 11:04:20 11567 11565 Successfully connected to Storage Manager.
2024-07-19 11:04:20 11567 11565 XBSA Error (BSACreateObject): An unspecified XBSA error has occured: 80
2024-07-19 11:04:20 11567 11565 XBSA Error (BSAQueryObject): An unspecified XBSA error has occured: 80
2024-07-19 11:04:21 11567 11565 Archive on rootdbs, sbspace01, datadbs01, llogdbs, plogdbs ABORTED (Requested Level 0).
2024-07-19 11:04:21 11567 11565 Begin backup of critical file '/opt/gbase8s_a2_2/backups/ixbar.0'.
2024-07-19 11:04:21 11567 11565 Successfully connected to Storage Manager.
2024-07-19 11:04:21 11567 11565 XBSA Error (BSACreateObject): An unspecified XBSA error has occured: 80
2024-07-19 11:04:21 11567 11565 /opt/gbase8s_a2_2/bin/onbar_d complete, returning 80 (0x50)
请问是什么原因,下面是bar_dbug日志