IT数码 购物 网址 头条 软件 日历 阅读 图书馆
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
图片批量下载器
↓批量下载图片,美女图库↓
图片自动播放器
↓图片自动播放器↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁
 
   -> 系统运维 -> DM8 Linux服务注册 -> 正文阅读

[系统运维]DM8 Linux服务注册

关于Linux系统中注册DM相关服务,环境Linux7,DM8?

注册服务:./dm_service_installer.sh

注销服务:./dm_service_uninstaller.sh

该shell文件在DM安装目录的script/root下(我的安装目录为/home/dmdba/dmdbs)

注册和注销服务需要以root身份登录

./dm_service_installer.sh -h 查看命令格式

cd /home/dmdba/dmdbms/script/root/
[root@test01 root]# ./dm_service_installer.sh -h
Usage: dm_service_installer.sh -t service_type [-p service_name_postfix] [-dm_ini dm_ini_file]
? ? ? ? [-watcher_ini watcher_ini_file ] [-monitor_ini monitor_ini_file] [-cssm_ini cssm_ini_file]
? ? ? ? [-dfs_ini dfs_ini_file] [-dcr_ini dcr_ini_file]
? ? ? ? [-dss_ini dss_ini_file] [-drs_ini drs_ini_file] [-dras_ini dras_ini_file] [-dcs_ini dcs_ini_file] [-server server_info]
? ? ? ? [-dmap_ini dmap_ini_file] [-m open|mount] [-y dependent_service] [-auto true|false]
? or dm_service_installer.sh [-s service_file_path]
? or dm_service_installer.sh -h

? ?-t ? ? ? ? ? ? ? 服务类型,包括dmimon,dmap,dmserver,dmwatcher,dmmonitor,dmcss,dmcssm,dmasmsvr,dmdcs,dmdrs,dmdras,dmdss
? ?-p ? ? ? ? ? ? ? 服务名后缀,对于dmimon,dmap服务类型无效,生成的操作系统服务名为“服务脚本模 板名称+服务名后缀”
? ?-dm_ini ? ? ? ? ?dm.ini文件路径
? ?-watcher_ini ? ? dmwatcher.ini文件路径.
? ?-monitor_ini ? ? dmmonitor.ini文件路径.
? ?-dcr_ini ? ? ? ? dmdcr.ini文件路径.
? ?-cssm_ini ? ? ? ?dmcssm.ini文件路径.
? ?-dss_ini ? ? ? ? dss.ini文件路径.
? ?-drs_ini ? ? ? ? drs.ini文件路径.
? ?-dras_ini ? ? ? ?dras.ini文件路径.
? ?-dcs_ini ? ? ? ? dcs.ini文件路径.
? ?-dfs_ini ? ? ? ? dfs.ini文件路径.
? ?-dmap_ini ? ? ? ?dmap.ini文件路径.
? ?-server ? ? ? ? ?服务器信息(IP:PORT)
? ?-auto ? ? ? ? ? ?设置服务是否自动启动,值为true或false,默认true.
? ?-m ? ? ? ? ? ? ? 设置服务器启动模式open或mount,只针对dmserver服务类型生效,可选
? ?-y ? ? ? ? ? ? ? 设置依赖服务,此选项只针对systemd服务环境下的dmserver和dmasmsvr服务生效
? ?-s ? ? ? ? ? ? ? 服务脚本路径,设置则忽略除-y外的其他参数选项
? ?-h ? ? ? ? ? ? ? 帮助

以dmserver服务为例:

如果输入/home/dmdba/dmdbs/bin/dmserver命令启动dmserver如图所示,窗口无法结束,结束窗口则服务也会关闭

[dmdba@test01 ~]$ /home/dmdba/dmdbms/bin/dmserver /dmdata/DAMENG/dm.ini 
file dm.key not found, use default license!
version info: develop
DM Database Server x64 V8 1-2-18-21.06.17-141777-10013-ENT  startup...
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
Database mode = 0, oguid = 0
License will expire on 2022-06-17
file lsn: 25047
ndct db load finished
ndct fill fast pool finished
iid page's trxid[4008]
NEXT TRX ID = 4009
pseg_collect_mgr_items, total collect 0 active_trxs, 0 cmt_trxs, 0 pre_cmt_trxs, 0 active_pages, 0 cmt_pages, 0 pre_cmt_pages, 0 mgr pages, 0 mgr recs!
total 0 active crash trx, pseg_crash_trx_rollback sys_only(0) begin ...
pseg_crash_trx_rollback end, total 0 active crash trx, include 0 empty_trxs, 0 empty_pages which only need to delete mgr recs.
pseg_crash_trx_rollback end
pseg recv finished
nsvr_startup end.
aud sys init success.
aud rt sys init success.
systables desc init success.
ndct_db_load_info success.
nsvr_process_before_open begin.
nsvr_process_before_open success.
total 0 active crash trx, pseg_crash_trx_rollback sys_only(0) begin ...
pseg_crash_trx_rollback end, total 0 active crash trx, include 0 empty_trxs, 0 empty_pages which only need to delete mgr recs.
pseg_crash_trx_rollback end
SYSTEM IS READY.
exit                    ###########此处执行exit退出,dmserver服务开始停止#########
Server is stopping...
listener closed  and all sessions disconnected
purge undo records in usegs...OK
full check point starting...
generate force checkpoint, rlog free space[536714240], used space[148480]
checkpoint begin, used_space[148480], free_space[536714240]...
checkpoint end, 0 pages flushed, used_space[152064], free_space[536710656].
full check point end.
shutdown audit subsystem...OK
shutdown schedule subsystem...OK
shutdown timer successfully.
pre-shutdown MAL subsystem...OK
shutdown worker threads subsystem...OK
shutdown local parallel threads pool successfully.
shutdown replication subsystem...OK
shutdown sequence cache subsystem...OK
wait for mtsk link worker to exit..OK
shutdown mpp session subsystem...OK
wait for rapply is all over... OK
rapply worker threads exit successfully.
pre ending task & worker threads...OK
shutdown dblink subsystem...OK
shutdown session subsystem...OK
shutdown rollback segments purging subsystem...OK
shutdown rps subsystem...OK
shutdown transaction subsystem...OK
shutdown locking subsystem...OK
shutdown dbms_lock subsystem...OK
ending tsk and worker threads...OK
ckpt2_exec_immediately begin.
checkpoint begin, used_space[152064], free_space[536710656]...
checkpoint end, 0 pages flushed, used_space[20480], free_space[536842240].
checkpoint begin, used_space[20480], free_space[536842240]...
checkpoint end, 0 pages flushed, used_space[20480], free_space[536842240].
checkpoint begin, used_space[20480], free_space[536842240]...
checkpoint end, 0 pages flushed, used_space[0], free_space[536862720].
checkpoint begin, used_space[0], free_space[536862720]...
checkpoint end, 0 pages flushed, used_space[0], free_space[536862720].
shutdown archive subsystem...OK
shutdown redo log subsystem...OK
shutdown MAL subsystem...OK
shutdown message compress subsystem successfully.
shutdown task subsystem...OK
shutdown trace subsystem...OK
shutdown svr_log subsystem...OK
shutdown plan cache subsystem...OK
shutdown file subsystem...OK
shutdown database dictionary subsystem...OK
shutdown mac cache subsystem...OK
shutdown dynamic login cache subsystem...OK
shutdown ifun/bifun/sfun/afun cache subsystem...OK
shutdown crypt subsystem...OK
shutdown pipe subsystem...OK
shutdown compress component...OK
shutdown slave redo subsystem...OK
shutdown kernel buffer subsystem...OK
shutdown SQL capture subsystem...OK
shutdown control file system...OK
shutdown dtype subsystem...OK
shutdown huge buffer and memory pools...OK
close lsnr socket
DM Database Server shutdown successfully.

?为了方便用户能够使DM服务程序以后台运行的方式启动,DM 服务程序提供了对应的服务脚本模板

注册服务:

./dm_service_installer.sh -t dmserver -dm_ini /dmdata/DAMENG/dm.ini -p GRP1_RT_01

通过服务脚本文件注册服务 :

如果已存在修改完成的服务脚本模板。用户可通过此服务脚本文件注册操作系统随机启动服务。

./dm_service_installer.sh -s /home/dmdba/dmdbms/bin/DmServiceGRP1_RT_01

如图生成一个DmServiceGRP1_RT_01.service服务 服务脚本路径为安装目录的bin目录下(我的为/home/dmdba/dmdbs/bin)

# cd /home/dmdba/dmdbms/script/root/
[root@test01 root]# ./dm_service_installer.sh -t dmserver -dm_ini /dmdata/DAMENG/dm.ini -p GRP1_RT_01
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServiceGRP1_RT_01.service to /usr/lib/systemd/system/DmServiceGRP1_RT_01.service.
创建服务(DmServiceGRP1_RT_01)完成

服务脚本支持的命令:

start|stop|status|condrestart|restart。

如下:

cd /home/dmdba/dmdbms/bin

start启动服务:

./DmServiceGRP1_RT_01 start

stop停止服务:

./DmServiceGRP1_RT_01 stop

restart 重启服务命令:

/DmServiceGRP1_RT_01 restart #重启服务

condrestart condrestart 也属于重启命令,但增加了确认条件。如果服务正在运行,等同于 restart 命令。

如果服务没有在运行,打印消息如下: DmServiceGRP1_RT_01 service is not running.

status查看服务状态:stopped表示已停止

注销服务:

./dm_service_uninstaller.sh -n?DmServiceGRP1_RT_01 #注销服务DmServiceGRP1_RT_01

各种服务脚本参数修改及服务注册可下载达梦官方手册详细查询

  系统运维 最新文章
配置小型公司网络WLAN基本业务(AC通过三层
如何在交付运维过程中建立风险底线意识,提
快速传输大文件,怎么通过网络传大文件给对
从游戏服务端角度分析移动同步(状态同步)
MySQL使用MyCat实现分库分表
如何用DWDM射频光纤技术实现200公里外的站点
国内顺畅下载k8s.gcr.io的镜像
自动化测试appium
ctfshow ssrf
Linux操作系统学习之实用指令(Centos7/8均
上一篇文章      下一篇文章      查看所有文章
加:2021-08-14 14:33:10  更:2021-08-14 14:34:10 
 
开发: C++知识库 Java知识库 JavaScript Python PHP知识库 人工智能 区块链 大数据 移动开发 嵌入式 开发工具 数据结构与算法 开发测试 游戏开发 网络协议 系统运维
教程: HTML教程 CSS教程 JavaScript教程 Go语言教程 JQuery教程 VUE教程 VUE3教程 Bootstrap教程 SQL数据库教程 C语言教程 C++教程 Java教程 Python教程 Python3教程 C#教程
数码: 电脑 笔记本 显卡 显示器 固态硬盘 硬盘 耳机 手机 iphone vivo oppo 小米 华为 单反 装机 图拉丁

360图书馆 购物 三丰科技 阅读网 日历 万年历 2024年5日历 -2024/5/20 16:06:19-

图片自动播放器
↓图片自动播放器↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  IT数码