代码拉取完成,页面将自动刷新
同步操作将从 hnyuanzj/DMShellInstall 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
[BEGIN] 2022/12/28 14:38:16
[root@centos7 soft]# ./DMShellInstall -h
███████ ████ ████ ████████ ██ ██ ██ ██ ██ ██ ██
░██░░░░██ ░██░██ ██░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
░██ ░██░██░░██ ██ ░██░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
░██ ░██░██ ░░███ ░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
░██ ░██░██ ░░█ ░██░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
░██ ██ ░██ ░ ░██ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
░███████ ░██ ░██ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
░░░░░░░ ░░ ░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░
用途: 一键部署达梦数据库[单机/数据守护/DMDSC集群]
用法: DMShellInstall [选项] 选项值 { COMMAND | help }
单机(Single):
-hn --hostname 主机名
-dp --dm_passwd 系统用户dmdba密码 [Dameng@123]
-d --env_dm_home 数据库软件安装目录 [/dm]
-dd --data_dir 数据库文件目录 [/dmdata]
-ad --arch_dir 数据库归档目录 [/dmarch]
-bd --backup_dir 数据库备份目录 [/dmbak]
-dn --db_name 数据库名称 [DAMENG]
-in --instance_name 数据库实例名称 [DMSERVER]
-es --extent_size 数据文件簇大小 [32]
-ps --page_size 数据页大小 [32]
-cs --case_sensitive 字符串大小写敏感 [Y]
-c --charset 数据库字符集 [1]
-lic --length_in_char VARCHAR类型长度是否以字符为单位 [N]
-ls --log_size 日志文件大小,单位M [1024]
-er --enable_arch 是否开启归档模式 [Y]
-sl --space_limit 归档空间大小,单位M [102400]
-pn --port_num 监听端口号 [5236]
-sp --sysdba_pwd 数据库SYSDBA用户密码 [SYSDBA]
-bm --backup_mode 数据库备份模式 [2]
-ti --timeserver_ip 时间服务器IP地址
-m --only_conf_os 仅配置操作系统,不安装达梦软件以及数据库 [N]
-ud --install_until_db 仅安装达梦数据库软件,不创建数据库 [N]
-oid --only_init_db 仅初始化数据库 [N]
-opd --optimize_db 建库后自动优化数据库 [N]
-oopd --only_optimize_db 脚本仅优化数据库 [N]
-mp --mem_percent 优化数据库时物理内存占比 [80]
-sm --sort_mode 并发量较高的OLTP数据库参数 [0],并发量不高的一般业务和OLAP类的数据库参数参数值 [1],默认[0]
-di --dm_iso_name 达梦数据库安装镜像名称
-kp --key_path 达梦数据库密钥路径
数据守护(DataWatch):
-rp --root_passwd root 用户密码
-dhn --wc_hostname 主机名,以逗号隔开,例如 -dhn dw01,dw02
-dpi --wc_public_ip 业务IP,以逗号隔开,例如 -dpi 10.211.55.101,10.211.55.102
-dmi --wc_mal_ip MAL IP,以逗号隔开,例如 -dmi 1.1.1.1,1.1.1.2
-dmoi --dw_monitor_ip 监视器主机 IP
-dgn --dw_group_name 数据守护组名 [GRP1]
-mpn --mal_port_num MAL 监听端口号 [5336],取值范围:1024~65535
-mdpn --mal_dw_port_num 守护进程端口号 [5436],取值范围:1024~65535
-midpn --mal_inst_dw_port_num 实例监听守护进程端口号 [5536],取值范围:1024~65535
-oi --os_iso 是否需要挂载操作系统 ISO 镜像,脚本自动配置 YUM 源 [Y]
DSC集群(DMDSC):
-rp --root_passwd root 用户密码
-dhn --wc_hostname 主机名,以逗号隔开,例如 -dhn dsc01,dsc02
-dpi --wc_public_ip 业务IP,以逗号隔开,例如 -dpi 10.211.55.101,10.211.55.102
-dmi --wc_mal_ip MAL IP,以逗号隔开,例如 -dmi 1.1.1.1,1.1.1.2
-ddn --dsc_db_name 数据库DB_NAME,默认值:DSC
-den --dsc_ep_name 数据库每个节点的实例名前缀,默认值:DSC
-dcd --dcr_disk dcr磁盘名字:/dev/sdb(多链路聚合的磁盘名字:dmdcr01),只能传入一块磁盘
-vod --vote_disk vote磁盘名字:/dev/sdc(多链路聚合的磁盘名字:dmvote01),只能传入一块磁盘
-lod --log_disk redo日志磁盘名字:/dev/sdd,/dev/sde(多链路聚合的磁盘名字:dmlog01,dmlog02),可以是一块盘,也可以是多块盘,如果没有划分单独的redo磁盘,可以不写
-ard --arch_disk 归档日志磁盘名字:/dev/sdf,/dev/sdg(多链路聚合的磁盘名字:dmarch01,dmarch02),可以是一块盘,也可以是多块盘,如果没有划分单独的arch磁盘,可以不写
-dad --data_disk 数据盘名字:/dev/sdh,/dev/sdi(多链路聚合的磁盘名字:dmdata01,dmdata02),可以是一块盘,也可以是多块盘,盘数必须大于等于 1
-apd --asm_pwd asm实例密码,默认值:Welcome1
-cdp --css_dcr_ep_port css通信端口,默认值:[9341],取值范围:1024~65534
-adp --asm_dcr_ep_port asm通信端口,默认值:[9351],取值范围:1024~65534
-ddp --db_dcr_ep_port db通信端口,默认值:[9741],取值范围:1024~65534
-amp --asvrmal_mal_port mal系统通信端口,默认值:[7236],取值范围:1024~65534
-mtp --multipath 是否需要配置multipath多链路聚合,脚本默认不配置 [N]
-oi --os_iso 是否需要挂载操作系统 ISO 镜像,脚本自动配置 YUM 源 [Y]
注意:本脚本仅用于新服务器上实施部署数据使用,请严禁在已运行数据库的主机上执行,以免发生数据丢失或者损坏,造成不可挽回的损失!!!
[root@centos7 soft]# ls
dm8_20221121_x86_rh6_64.iso DMShellInstall
[root@centos7 soft]# ./DMShellInstall -di dm8_20221121_x86_rh6_64.iso -d /dm/dmdbms \
> -dd /dm/dmdata -bd /dm/dmbak \
> -hn dsc -rp 123456 \
> -ddn DMDSC -den DMDSC \
> -dpi 192.168.2.37,192.168.2.38 -dmi 172.16.2.37,172.16.2.38 \
> -dcd asmdata1 -vod asmdata2 -ard asmdata3,asmdata4 -lod asmdata5,asmdata6 -dad asmdata7,asmdata8,asmdata9 \
> -adp 12345 -cdp 12346 -ddp 12347 -amp 9999 \
> -mtp Y -oi N
███████ ████ ████ ████████ ██ ██ ██ ██ ██ ██ ██
░██░░░░██ ░██░██ ██░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
░██ ░██░██░░██ ██ ░██░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
░██ ░██░██ ░░███ ░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
░██ ░██░██ ░░█ ░██░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
░██ ██ ░██ ░ ░██ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
░███████ ░██ ░██ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
░░░░░░░ ░░ ░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░
请选择达梦数据库部署类型:单机[si]/数据守护[dw]/dsc集群[dsc]
dsc
达梦数据库安装部署类型: dsc
校验 192.168.2.37,192.168.2.38 地址,请等待!!!
校验 172.16.2.37,172.16.2.38 地址,请等待!!!
校验 asmdata1 磁盘,请等待!!!
校验 asmdata2 磁盘,请等待!!!
校验 asmdata5,asmdata6 磁盘,请等待!!!
校验 asmdata3,asmdata4 磁盘,请等待!!!
校验 asmdata7,asmdata8,asmdata9 磁盘,请等待!!!
主库安装 expect 软件用于 root 用户互信:
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
正在解决依赖关系
--> 正在检查事务
---> 软件包 expect.x86_64.0.5.45-14.el7_1 将被 安装
--> 正在处理依赖关系 libtcl8.5.so()(64bit),它被软件包 expect-5.45-14.el7_1.x86_64 需要
--> 正在检查事务
---> 软件包 tcl.x86_64.1.8.5.13-8.el7 将被 安装
--> 解决依赖关系完成
依赖关系解决
===============================================================================================================================================================================================================
Package 架构 版本 源 大小
===============================================================================================================================================================================================================
正在安装:
expect x86_64 5.45-14.el7_1 OS-YUM 262 k
为依赖而安装:
tcl x86_64 1:8.5.13-8.el7 OS-YUM 1.9 M
事务概要
===============================================================================================================================================================================================================
安装 1 软件包 (+1 依赖软件包)
总下载量:2.1 M
安装大小:4.9 M
Downloading packages:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
总计 24 MB/s | 2.1 MB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : 1:tcl-8.5.13-8.el7.x86_64 1/2
正在安装 : expect-5.45-14.el7_1.x86_64 2/2
验证中 : 1:tcl-8.5.13-8.el7.x86_64 1/2
验证中 : expect-5.45-14.el7_1.x86_64 2/2
已安装:
expect.x86_64 0:5.45-14.el7_1
作为依赖被安装:
tcl.x86_64 1:8.5.13-8.el7
完毕!
所有节点 root 用户配置互信:
# 192.168.2.37:22 SSH-2.0-OpenSSH_7.4
# 192.168.2.37:22 SSH-2.0-OpenSSH_7.4
# 192.168.2.37:22 SSH-2.0-OpenSSH_7.4
# 192.168.2.38:22 SSH-2.0-OpenSSH_7.4
# 192.168.2.38:22 SSH-2.0-OpenSSH_7.4
# 192.168.2.38:22 SSH-2.0-OpenSSH_7.4
spawn scp -rq /root/.ssh root@192.168.2.37:~
send: spawn id exp6 not open
while executing
"send "123456\r""
spawn ssh-copy-id -i root@192.168.2.37
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system.
(if you think this is a mistake, you may want to use -f option)
send: spawn id exp6 not open
while executing
"send "123456\r""
spawn scp -rq /root/.ssh root@192.168.2.38:~
root@192.168.2.38's password:
spawn ssh-copy-id -i root@192.168.2.38
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "/root/.ssh/id_rsa.pub"
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: WARNING: All keys were skipped because they already exist on the remote system.
(if you think this is a mistake, you may want to use -f option)
send: spawn id exp6 not open
while executing
"send "123456\r""
拷贝脚本以及安装包到节点:192.168.2.38
dwnode.sh 100% 560 654.3KB/s 00:00
DMShellInstall 100% 139KB 25.8MB/s 00:00
dm8_20221121_x86_rh6_64.iso 100% 959MB 82.1MB/s 00:11
达梦数据库开始安装:
#==============================================================#
打印系统信息
#==============================================================#
服务器时间:
2022年 12月 28日 星期三 21:42:35 CST
操作系统版本:
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
cpu信息:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
座: 1
NUMA 节点: 1
厂商 ID: GenuineIntel
CPU 系列: 6
型号: 142
型号名称: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
步进: 12
CPU MHz: 1992.002
BogoMIPS: 3984.00
超管理器厂商: VMware
虚拟化类型: 完全
L1d 缓存: 32K
L1i 缓存: 32K
L2 缓存: 256K
L3 缓存: 8192K
NUMA 节点0 CPU: 0
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilities
内存信息:
total used free shared buff/cache available
Mem: 2827 241 1389 9 1196 2418
Swap: 0 0 0
total used free shared buff/cache available
Mem: 2.8G 241M 1.4G 9.5M 1.2G 2.4G
Swap: 0B 0B 0B
挂载信息:
/dev/mapper/centos-root / xfs defaults 0 0
UUID=dc24af02-0269-4d90-88b9-c6fdb8c27470 /boot xfs defaults 0 0
/dev/sr0 /mnt/cdrom iso9660 defaults 0 0
目录信息:
文件系统 容量 已用 可用 已用% 挂载点
devtmpfs 1.4G 0 1.4G 0% /dev
tmpfs 1.4G 0 1.4G 0% /dev/shm
tmpfs 1.4G 9.5M 1.4G 1% /run
tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup
/dev/mapper/centos-root 91G 2.7G 89G 3% /
/dev/sr0 4.4G 4.4G 0 100% /mnt/cdrom
/dev/sda1 1014M 151M 864M 15% /boot
tmpfs 283M 0 283M 0% /run/user/0
/dev/loop0 960M 960M 0 100% /dmiso
#==============================================================#
关闭 SWAP 功能
#==============================================================#
total used free shared buff/cache available
Mem: 2895196 247248 1423008 9696 1224940 2476912
Swap: 0 0 0
##/dev/mapper/centos-swap swap swap defaults 0 0
#==============================================================#
禁用防火墙
#==============================================================#
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
12月 28 21:18:06 centos7 systemd[1]: Starting firewalld - dynamic firewall daemon...
12月 28 21:18:06 centos7 systemd[1]: Started firewalld - dynamic firewall daemon.
12月 28 21:18:07 centos7 firewalld[726]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now.
12月 28 21:35:10 centos7 systemd[1]: Stopping firewalld - dynamic firewall daemon...
12月 28 21:35:10 centos7 systemd[1]: Stopped firewalld - dynamic firewall daemon.
#==============================================================#
禁用 selinux
#==============================================================#
SELINUX=disabled
SELINUXTYPE=targeted
#==============================================================#
配置主机名
#==============================================================#
Static hostname: dsc01
Icon name: computer-vm
Chassis: vm
Machine ID: f4a41440d98d417dbb5516d46b966467
Boot ID: a97baae239384e028b43566ad3ca22a7
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1160.el7.x86_64
Architecture: x86-64
#==============================================================#
配置时间同步
#==============================================================#
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:chronyd(8)
man:chrony.conf(5)
12月 28 21:18:06 centos7 systemd[1]: Starting NTP client/server...
12月 28 21:18:06 centos7 chronyd[723]: chronyd version 3.4 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 +DEBUG)
12月 28 21:18:06 centos7 chronyd[723]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/drift
12月 28 21:18:06 centos7 systemd[1]: Started NTP client/server.
12月 28 21:35:10 centos7 systemd[1]: Stopping NTP client/server...
12月 28 21:35:10 centos7 systemd[1]: Stopped NTP client/server.
2022年 12月 28日 星期三 21:42:35 CST
* 6 * * * /root/drop_cache.sh
#==============================================================#
禁用透明大页 & 禁用NUMA & 开启 I/0 schedule
#==============================================================#
index=0
kernel=/boot/vmlinuz-3.10.0-1160.el7.x86_64
args="ro crashkernel=auto spectre_v2=retpoline rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet LANG=zh_CN.UTF-8 numa=off transparent_hugepage=never elevator=deadline"
--
index=1
kernel=/boot/vmlinuz-0-rescue-f4a41440d98d417dbb5516d46b966467
args="ro crashkernel=auto spectre_v2=retpoline rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet numa=off transparent_hugepage=never elevator=deadline"
#==============================================================#
创建 DMDBA 用户以及安装目录
#==============================================================#
更改用户 dmdba 的密码 。
passwd:所有的身份验证令牌已经成功更新。
dmdba:x:54321:54321::/home/dmdba:/bin/bash
uid=54321(dmdba) gid=54321(dinstall) 组=54321(dinstall),54322(dmdba)
#==============================================================#
配置系统参数
#==============================================================#
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
vm.swappiness = 0
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
sysctl: cannot stat /proc/sys/vm/numa_stat: 没有那个文件或目录
vm.overcommit_memory = 0
#==============================================================#
配置用户限制
#==============================================================#
dmdba - nice 0
dmdba - as unlimited
dmdba - fsize unlimited
dmdba - nproc 131072
dmdba - nofile 131072
dmdba - core unlimited
dmdba - data unlimited
root - nice 0
root - as unlimited
root - fsize unlimited
root - nproc 131072
root - nofile 131072
root - core unlimited
root - data unlimited
[Manager]
DefaultLimitCORE=infinity
DefaultLimitNOFILE=65536
DefaultLimitNPROC=10240
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth substack system-auth
auth include postlogin
account required pam_nologin.so
account include system-auth
password include system-auth
session required pam_selinux.so close
session required pam_loginuid.so
session optional pam_console.so
session required pam_selinux.so open
session required pam_namespace.so
session optional pam_keyinit.so force revoke
session include system-auth
session include postlogin
-session optional pam_ck_connector.so
session required pam_limits.so
session required /lib64/security/pam_limits.so
#==============================================================#
禁用 RemoveIPC
#==============================================================#
[Login]
RemoveIPC=no
#==============================================================#
配置语言中文
#==============================================================#
#==============================================================#
配置cache脚本
#==============================================================#
sync
echo 1 > /proc/sys/vm/drop_caches
sync
echo 1 > /proc/sys/vm/drop_caches
* 6 * * * /root/drop_cache.sh
* 6 * * * /root/drop_cache.sh
#==============================================================#
配置用户环境变量
#==============================================================#
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export MALLOC_ARENA_MAX=1
export DM_HOME=/dm/dmdbms
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DM_HOME/bin
export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool
export PS1="[`whoami`@`hostname`:"'\w]$ '
alias ds="disql -L SYSDBA/'\"SYSDBA\"':5236 "
alias dsql="disql -L -S SYSDBA/'\"SYSDBA\"':5236 \\\`"
alias dssql="disql -L -S SYSDBA/'\"SYSDBA\"':5236 \\\`"
alias dmlog='cd $DM_HOME/log'
#==============================================================#
挂载达梦安装镜像
#==============================================================#
总用量 959M
-r-xr-xr-x. 1 root root 2.7M 11月 21 16:25 DM8 Install.pdf
-r-xr-xr-x. 1 root root 957M 11月 21 16:27 DMInstall.bin
#==============================================================#
安装达梦数据库软件
#==============================================================#
解压安装程序.........
2022-12-28 21:42:54
[INFO] 安装达梦数据库...
2022-12-28 21:42:54
[INFO] 安装 基础 模块...
2022-12-28 21:42:58
[INFO] 安装 服务器 模块...
2022-12-28 21:42:59
[INFO] 安装 客户端 模块...
2022-12-28 21:43:02
[INFO] 安装 驱动 模块...
2022-12-28 21:43:04
[INFO] 安装 手册 模块...
2022-12-28 21:43:05
[INFO] 安装 服务 模块...
2022-12-28 21:43:06
[INFO] 移动日志文件。
2022-12-28 21:43:07
[INFO] 更改安装目录权限完成。
2022-12-28 21:43:07
[INFO] 正在启动DmAPService服务...
2022-12-28 21:43:07
[INFO] 启动DmAPService服务成功。
2022-12-28 21:43:07
[INFO] 安装达梦数据库完成。
#==============================================================#
创建UDEV规则文件
#==============================================================#
KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmdcr01", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part2-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmvote01", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part5-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmlog01", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part6-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmlog02", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part3-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmarch01", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part4-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmarch02", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part7-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmdata01", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part8-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmdata02", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part9-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmdata03", OWNER="dmdba", GROUP="dinstall", MODE="0660"
#==============================================================#
查看udev磁盘
#==============================================================#
ls -lh /dev/asmdisk
总用量 0
lrwxrwxrwx. 1 root root 7 12月 28 21:43 dmarch01 -> ../dm-5
lrwxrwxrwx. 1 root root 7 12月 28 21:43 dmarch02 -> ../dm-6
lrwxrwxrwx. 1 root root 7 12月 28 21:43 dmdata01 -> ../dm-9
lrwxrwxrwx. 1 root root 8 12月 28 21:43 dmdata02 -> ../dm-10
lrwxrwxrwx. 1 root root 8 12月 28 21:43 dmdata03 -> ../dm-11
lrwxrwxrwx. 1 root root 7 12月 28 21:43 dmdcr01 -> ../dm-3
lrwxrwxrwx. 1 root root 7 12月 28 21:43 dmlog01 -> ../dm-7
lrwxrwxrwx. 1 root root 7 12月 28 21:43 dmlog02 -> ../dm-8
lrwxrwxrwx. 1 root root 7 12月 28 21:43 dmvote01 -> ../dm-4
#==============================================================#
创建dsc参数文件
#==============================================================#
ls -lh /dm/dmdata/DMDSC/
总用量 16K
-rw-r--r--. 1 dmdba dinstall 258 12月 28 21:43 dmasvrmal.ini
-rw-r--r--. 1 dmdba dinstall 165 12月 28 21:43 dmcssm.ini
-rw-r--r--. 1 dmdba dinstall 1.1K 12月 28 21:43 dmdcr_cfg.ini
-rw-r--r--. 1 dmdba dinstall 423 12月 28 21:43 dmdcr.ini
#==============================================================#
注册css和asm服务
#==============================================================#
Created symlink from /etc/systemd/system/multi-user.target.wants/DmCSSServiceCss.service to /usr/lib/systemd/system/DmCSSServiceCss.service.
创建服务(DmCSSServiceCss)完成
Created symlink from /etc/systemd/system/multi-user.target.wants/DmASMSvrServiceAsmsvr.service to /usr/lib/systemd/system/DmASMSvrServiceAsmsvr.service.
创建服务(DmASMSvrServiceAsmsvr)完成
#==============================================================#
创建归档和备份脚本
#==============================================================#
创建数据库归档脚本:
-rw-r--r--. 1 dmdba dinstall 338 12月 28 21:43 /home/dmdba/scripts/conf_arch.sql
创建数据库备份脚本:
-rw-r--r--. 1 dmdba dinstall 784 12月 28 21:43 /home/dmdba/scripts/conf_fullbackup.sql
-rw-r--r--. 1 dmdba dinstall 1.6K 12月 28 21:43 /home/dmdba/scripts/conf_incrbackup.sql
创建 DMDBA 用户脚本,密码 SYSDBA :
-rw-r--r--. 1 dmdba dinstall 696 12月 28 21:43 /home/dmdba/scripts/ct_dbuser.sql
#==============================================================#
创建达梦数据库优化脚本
#==============================================================#
创建数据库参数配置脚本:
-rw-r--r--. 1 dmdba dinstall 17K 12月 28 21:43 /home/dmdba/scripts/conf_para.sql
创建数据库优化结果查询脚本:
-rw-r--r--. 1 dmdba dinstall 2.2K 12月 28 21:43 /home/dmdba/scripts/query_dm.sql
#==============================================================#
配置节点:192.168.2.38
#==============================================================#
节点 192.168.2.38 开始执行配置:
███████ ████ ████ ████████ ██ ██ ██ ██ ██ ██ ██
░██░░░░██ ░██░██ ██░██ ██░░░░░░ ░██ ░██ ░██░██ ░██ ░██ ░██
░██ ░██░██░░██ ██ ░██░██ ░██ █████ ░██ ░██░██ ███████ ██████ ██████ ██████ ░██ ░██
░██ ░██░██ ░░███ ░██░█████████░██████ ██░░░██ ░██ ░██░██░░██░░░██ ██░░░░ ░░░██░ ░░░░░░██ ░██ ░██
░██ ░██░██ ░░█ ░██░░░░░░░░██░██░░░██░███████ ░██ ░██░██ ░██ ░██░░█████ ░██ ███████ ░██ ░██
░██ ██ ░██ ░ ░██ ░██░██ ░██░██░░░░ ░██ ░██░██ ░██ ░██ ░░░░░██ ░██ ██░░░░██ ░██ ░██
░███████ ░██ ░██ ████████ ░██ ░██░░██████ ███ ███░██ ███ ░██ ██████ ░░██ ░░████████ ███ ███
░░░░░░░ ░░ ░░ ░░░░░░░░ ░░ ░░ ░░░░░░ ░░░ ░░░ ░░ ░░░ ░░ ░░░░░░ ░░ ░░░░░░░░ ░░░ ░░░
达梦数据库开始安装:
#==============================================================#
打印系统信息
#==============================================================#
服务器时间:
2022年 12月 28日 星期三 21:40:42 CST
操作系统版本:
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"
cpu信息:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 1
On-line CPU(s) list: 0
Thread(s) per core: 1
Core(s) per socket: 1
座: 1
NUMA 节点: 1
厂商 ID: GenuineIntel
CPU 系列: 6
型号: 142
型号名称: Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
步进: 12
CPU MHz: 1992.002
BogoMIPS: 3984.00
超管理器厂商: VMware
虚拟化类型: 完全
L1d 缓存: 32K
L1i 缓存: 32K
L2 缓存: 256K
L3 缓存: 8192K
NUMA 节点0 CPU: 0
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid rdseed adx smap clflushopt xsaveopt xsavec xgetbv1 arat md_clear spec_ctrl intel_stibp flush_l1d arch_capabilities
内存信息:
total used free shared buff/cache available
Mem: 2827 270 1392 9 1163 2380
Swap: 8191 0 8191
total used free shared buff/cache available
Mem: 2.8G 270M 1.4G 9.5M 1.1G 2.3G
Swap: 8.0G 0B 8.0G
挂载信息:
/dev/mapper/centos-root / xfs defaults 0 0
UUID=dc24af02-0269-4d90-88b9-c6fdb8c27470 /boot xfs defaults 0 0
/dev/mapper/centos-swap swap swap defaults 0 0
/dev/sr0 /mnt/cdrom iso9660 defaults 0 0
目录信息:
文件系统 容量 已用 可用 已用% 挂载点
devtmpfs 1.4G 0 1.4G 0% /dev
tmpfs 1.4G 0 1.4G 0% /dev/shm
tmpfs 1.4G 9.6M 1.4G 1% /run
tmpfs 1.4G 0 1.4G 0% /sys/fs/cgroup
/dev/mapper/centos-root 91G 2.7G 89G 3% /
/dev/sr0 4.4G 4.4G 0 100% /mnt/cdrom
/dev/sda1 1014M 151M 864M 15% /boot
tmpfs 283M 0 283M 0% /run/user/0
#==============================================================#
关闭 SWAP 功能
#==============================================================#
total used free shared buff/cache available
Mem: 2895196 270584 1435164 9740 1189448 2444608
Swap: 0 0 0
#/dev/mapper/centos-swap swap swap defaults 0 0
#==============================================================#
禁用防火墙
#==============================================================#
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
12月 28 21:15:36 centos7 systemd[1]: Starting firewalld - dynamic firewall daemon...
12月 28 21:15:36 centos7 systemd[1]: Started firewalld - dynamic firewall daemon.
12月 28 21:15:37 centos7 firewalld[732]: WARNING: AllowZoneDrifting is enabled. This is considered an insecure configuration option. It will be removed in a future release. Please consider disabling it now.
12月 28 21:40:42 centos7 systemd[1]: Stopping firewalld - dynamic firewall daemon...
12月 28 21:40:42 centos7 systemd[1]: Stopped firewalld - dynamic firewall daemon.
#==============================================================#
禁用 selinux
#==============================================================#
SELINUX=disabled
SELINUXTYPE=targeted
#==============================================================#
配置主机名
#==============================================================#
Static hostname: dsc02
Icon name: computer-vm
Chassis: vm
Machine ID: f4a41440d98d417dbb5516d46b966467
Boot ID: 4445142e789347a99457a39ccbf82cae
Virtualization: vmware
Operating System: CentOS Linux 7 (Core)
CPE OS Name: cpe:/o:centos:centos:7
Kernel: Linux 3.10.0-1160.el7.x86_64
Architecture: x86-64
#==============================================================#
配置时间同步
#==============================================================#
● chronyd.service - NTP client/server
Loaded: loaded (/usr/lib/systemd/system/chronyd.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:chronyd(8)
man:chrony.conf(5)
12月 28 21:15:36 centos7 systemd[1]: Starting NTP client/server...
12月 28 21:15:36 centos7 chronyd[714]: chronyd version 3.4 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +SECHASH +IPV6 +DEBUG)
12月 28 21:15:36 centos7 chronyd[714]: Frequency 0.000 +/- 1000000.000 ppm read from /var/lib/chrony/drift
12月 28 21:15:36 centos7 systemd[1]: Started NTP client/server.
12月 28 21:40:42 dsc02 systemd[1]: Stopping NTP client/server...
12月 28 21:40:42 dsc02 systemd[1]: Stopped NTP client/server.
2022年 12月 28日 星期三 21:40:42 CST
no crontab for root
#==============================================================#
禁用透明大页 & 禁用NUMA & 开启 I/0 schedule
#==============================================================#
index=0
kernel=/boot/vmlinuz-3.10.0-1160.el7.x86_64
args="ro crashkernel=auto spectre_v2=retpoline rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet LANG=zh_CN.UTF-8 numa=off transparent_hugepage=never elevator=deadline"
--
index=1
kernel=/boot/vmlinuz-0-rescue-f4a41440d98d417dbb5516d46b966467
args="ro crashkernel=auto spectre_v2=retpoline rd.lvm.lv=centos/root rd.lvm.lv=centos/swap rhgb quiet numa=off transparent_hugepage=never elevator=deadline"
#==============================================================#
创建 DMDBA 用户以及安装目录
#==============================================================#
更改用户 dmdba 的密码 。
passwd:所有的身份验证令牌已经成功更新。
dmdba:x:54321:54321::/home/dmdba:/bin/bash
uid=54321(dmdba) gid=54321(dinstall) 组=54321(dinstall),54322(dmdba)
#==============================================================#
配置系统参数
#==============================================================#
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
vm.swappiness = 0
vm.dirty_background_ratio = 3
vm.dirty_ratio = 80
vm.dirty_expire_centisecs = 500
vm.dirty_writeback_centisecs = 100
sysctl: cannot stat /proc/sys/vm/numa_stat: 没有那个文件或目录
vm.overcommit_memory = 0
#==============================================================#
配置用户限制
#==============================================================#
dmdba - nice 0
dmdba - as unlimited
dmdba - fsize unlimited
dmdba - nproc 131072
dmdba - nofile 131072
dmdba - core unlimited
dmdba - data unlimited
root - nice 0
root - as unlimited
root - fsize unlimited
root - nproc 131072
root - nofile 131072
root - core unlimited
root - data unlimited
[Manager]
DefaultLimitCORE=infinity
DefaultLimitNOFILE=65536
DefaultLimitNPROC=10240
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
auth substack system-auth
auth include postlogin
account required pam_nologin.so
account include system-auth
password include system-auth
session required pam_selinux.so close
session required pam_loginuid.so
session optional pam_console.so
session required pam_selinux.so open
session required pam_namespace.so
session optional pam_keyinit.so force revoke
session include system-auth
session include postlogin
-session optional pam_ck_connector.so
session required pam_limits.so
session required /lib64/security/pam_limits.so
#==============================================================#
禁用 RemoveIPC
#==============================================================#
[Login]
RemoveIPC=no
#==============================================================#
配置语言中文
#==============================================================#
export LANG=zh_CN.UTF-8
#==============================================================#
配置cache脚本
#==============================================================#
sync
echo 1 > /proc/sys/vm/drop_caches
* 6 * * * /root/drop_cache.sh
#==============================================================#
配置用户环境变量
#==============================================================#
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export MALLOC_ARENA_MAX=1
export DM_HOME=/dm/dmdbms
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DM_HOME/bin
export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool
export PS1="[`whoami`@`hostname`:"'\w]$ '
alias ds="disql -L SYSDBA/'\"SYSDBA\"':5236 "
alias dsql="disql -L -S SYSDBA/'\"SYSDBA\"':5236 \\\`"
alias dssql="disql -L -S SYSDBA/'\"SYSDBA\"':5236 \\\`"
alias dmlog='cd $DM_HOME/log'
#==============================================================#
挂载达梦安装镜像
#==============================================================#
总用量 959M
-r-xr-xr-x. 1 root root 2.7M 11月 21 16:25 DM8 Install.pdf
-r-xr-xr-x. 1 root root 957M 11月 21 16:27 DMInstall.bin
#==============================================================#
安装达梦数据库软件
#==============================================================#
解压安装程序.........
2022-12-28 21:41:11
[INFO] 安装达梦数据库...
2022-12-28 21:41:11
[INFO] 安装 基础 模块...
2022-12-28 21:41:16
[INFO] 安装 服务器 模块...
2022-12-28 21:41:17
[INFO] 安装 客户端 模块...
2022-12-28 21:41:21
[INFO] 安装 驱动 模块...
2022-12-28 21:41:23
[INFO] 安装 手册 模块...
2022-12-28 21:41:23
[INFO] 安装 服务 模块...
2022-12-28 21:41:25
[INFO] 移动日志文件。
2022-12-28 21:41:25
[INFO] 更改安装目录权限完成。
2022-12-28 21:41:26
[INFO] 正在启动DmAPService服务...
2022-12-28 21:41:26
[INFO] 启动DmAPService服务成功。
2022-12-28 21:41:26
[INFO] 安装达梦数据库完成。
#==============================================================#
拷贝UDEV规则文件
#==============================================================#
KERNEL=="dm-*", ENV{DM_UUID}=="part1-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmdcr01", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part2-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmvote01", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part5-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmlog01", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part6-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmlog02", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part3-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmarch01", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part4-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmarch02", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part7-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmdata01", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part8-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmdata02", OWNER="dmdba", GROUP="dinstall", MODE="0660"
KERNEL=="dm-*", ENV{DM_UUID}=="part9-mpath-36001405265c20d06e59400ebd6cc57d5", SYMLINK+="asmdisk/dmdata03", OWNER="dmdba", GROUP="dinstall", MODE="0660"
#==============================================================#
查看udev磁盘
#==============================================================#
ls -lh /dev/asmdisk
总用量 0
lrwxrwxrwx. 1 root root 7 12月 28 21:41 dmarch01 -> ../dm-5
lrwxrwxrwx. 1 root root 7 12月 28 21:41 dmarch02 -> ../dm-6
lrwxrwxrwx. 1 root root 7 12月 28 21:41 dmdata01 -> ../dm-9
lrwxrwxrwx. 1 root root 8 12月 28 21:41 dmdata02 -> ../dm-10
lrwxrwxrwx. 1 root root 8 12月 28 21:41 dmdata03 -> ../dm-11
lrwxrwxrwx. 1 root root 7 12月 28 21:41 dmdcr01 -> ../dm-3
lrwxrwxrwx. 1 root root 7 12月 28 21:41 dmlog01 -> ../dm-7
lrwxrwxrwx. 1 root root 7 12月 28 21:41 dmlog02 -> ../dm-8
lrwxrwxrwx. 1 root root 7 12月 28 21:41 dmvote01 -> ../dm-4
#==============================================================#
拷贝dsc参数文件
#==============================================================#
ls -lh /dm/dmdata/DMDSC/
总用量 16K
-rw-r--r--. 1 dmdba dinstall 258 12月 28 21:41 dmasvrmal.ini
-rw-r--r--. 1 dmdba dinstall 165 12月 28 21:41 dmcssm.ini
-rw-r--r--. 1 dmdba dinstall 1.1K 12月 28 21:41 dmdcr_cfg.ini
-rw-r--r--. 1 dmdba dinstall 423 12月 28 21:41 dmdcr.ini
#==============================================================#
注册css和asm服务
#==============================================================#
Created symlink from /etc/systemd/system/multi-user.target.wants/DmCSSServiceCss.service to /usr/lib/systemd/system/DmCSSServiceCss.service.
创建服务(DmCSSServiceCss)完成
Created symlink from /etc/systemd/system/multi-user.target.wants/DmASMSvrServiceAsmsvr.service to /usr/lib/systemd/system/DmASMSvrServiceAsmsvr.service.
创建服务(DmASMSvrServiceAsmsvr)完成
#==============================================================#
创建归档和备份脚本
#==============================================================#
创建数据库归档脚本:
-rw-r--r--. 1 dmdba dinstall 338 12月 28 21:41 /home/dmdba/scripts/conf_arch.sql
创建数据库备份脚本:
-rw-r--r--. 1 dmdba dinstall 784 12月 28 21:41 /home/dmdba/scripts/conf_fullbackup.sql
-rw-r--r--. 1 dmdba dinstall 1.6K 12月 28 21:41 /home/dmdba/scripts/conf_incrbackup.sql
创建 DMDBA 用户脚本,密码 SYSDBA :
-rw-r--r--. 1 dmdba dinstall 696 12月 28 21:41 /home/dmdba/scripts/ct_dbuser.sql
#==============================================================#
创建达梦数据库优化脚本
#==============================================================#
创建数据库参数配置脚本:
-rw-r--r--. 1 dmdba dinstall 17K 12月 28 21:41 /home/dmdba/scripts/conf_para.sql
创建数据库优化结果查询脚本:
-rw-r--r--. 1 dmdba dinstall 2.2K 12月 28 21:41 /home/dmdba/scripts/query_dm.sql
Connection to 192.168.2.38 closed.
节点 192.168.2.38 配置完成!
#==============================================================#
初始化asm磁盘
#==============================================================#
DMASMCMD V8
ASM>create dcrdisk '/dev/asmdisk/dmdcr01' 'dmdcr01'
[Trace]The ASM initialize dcrdisk /dev/asmdisk/dmdcr01 to name DMASMdmdcr01
Used time: 10.569(ms).
ASM>create votedisk '/dev/asmdisk/dmvote01' 'dmvote01'
[Trace]The ASM initialize votedisk /dev/asmdisk/dmvote01 to name DMASMdmvote01
Used time: 4.553(ms).
ASM>create asmdisk '/dev/asmdisk/dmlog01' 'dmlog01'
[Trace]The ASM initialize asmdisk /dev/asmdisk/dmlog01 to name DMASMdmlog01
Used time: 8.710(ms).
ASM>create asmdisk '/dev/asmdisk/dmlog02' 'dmlog02'
[Trace]The ASM initialize asmdisk /dev/asmdisk/dmlog02 to name DMASMdmlog02
Used time: 17.997(ms).
ASM>create asmdisk '/dev/asmdisk/dmarch01' 'dmarch01'
[Trace]The ASM initialize asmdisk /dev/asmdisk/dmarch01 to name DMASMdmarch01
Used time: 13.059(ms).
ASM>create asmdisk '/dev/asmdisk/dmarch02' 'dmarch02'
[Trace]The ASM initialize asmdisk /dev/asmdisk/dmarch02 to name DMASMdmarch02
Used time: 11.728(ms).
ASM>create asmdisk '/dev/asmdisk/dmdata01' 'dmdata01'
[Trace]The ASM initialize asmdisk /dev/asmdisk/dmdata01 to name DMASMdmdata01
Used time: 12.316(ms).
ASM>create asmdisk '/dev/asmdisk/dmdata02' 'dmdata02'
[Trace]The ASM initialize asmdisk /dev/asmdisk/dmdata02 to name DMASMdmdata02
Used time: 13.669(ms).
ASM>create asmdisk '/dev/asmdisk/dmdata03' 'dmdata03'
[Trace]The ASM initialize asmdisk /dev/asmdisk/dmdata03 to name DMASMdmdata03
Used time: 11.307(ms).
ASM>init dcrdisk '/dev/asmdisk/dmdcr01' from '/dm/dmdata/DMDSC/dmdcr_cfg.ini'identified by 'Welcome1'
[Trace]DG 126 alloc one extent for inodes, addr(disk_id, disk_auno, extent_no):(0,0,1).
[Trace]DG 126 allocate 4 extents for file 0xfe000002.
[Trace]DG 126 alloc 4 extents for 0xfe000002, addr(disk_id, disk_auno, extent_no):(0, 0, 2)->(0, 0, 5), need_init = 1.
Used time: 342.123(ms).
ASM>init votedisk '/dev/asmdisk/dmvote01' from '/dm/dmdata/DMDSC/dmdcr_cfg.ini'
[Trace]DG 125 alloc one extent for inodes, addr(disk_id, disk_auno, extent_no):(0,0,1).
[Trace]DG 125 allocate 4 extents for file 0xfd000002.
[Trace]DG 125 alloc 4 extents for 0xfd000002, addr(disk_id, disk_auno, extent_no):(0, 0, 2)->(0, 0, 5), need_init = 1.
Used time: 183.202(ms).
#==============================================================#
启动css和asm服务
#==============================================================#
Starting DmCSSServiceCss: [ OK ]
节点 192.168.2.37 启动成功
Starting DmCSSServiceCss: [ OK ]
节点 192.168.2.38 启动成功
Starting DmASMSvrServiceAsmsvr: [ OK ]
节点 192.168.2.37 启动成功
Starting DmASMSvrServiceAsmsvr: [ OK ]
节点 192.168.2.38 启动成功
#==============================================================#
创建ASM磁盘组
#==============================================================#
DMASMTOOL V8
Used time: 275.527(ms).
ASM>ASM>DMASMTOOL V8
Used time: 113.666(ms).
ASM>ASM>DMASMTOOL V8
Used time: 184.261(ms).
ASM>ASM>DMASMTOOL V8
Used time: 94.176(ms).
ASM>ASM>DMASMTOOL V8
Used time: 206.977(ms).
ASM>ASM>DMASMTOOL V8
Used time: 102.668(ms).
ASM>ASM>DMASMTOOL V8
Used time: 110.920(ms).
ASM>ASM>
#==============================================================#
初始化达梦数据库
#==============================================================#
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2023-11-21
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
log file path: +DMLOG/log/dmdsc0_log01.log
log file path: +DMLOG/log/dmdsc0_log02.log
log file path: +DMLOG/log/dmdsc1_log01.log
log file path: +DMLOG/log/dmdsc1_log02.log
write to dir [+DMDATA/data/DMDSC].
create dm database success. 2022-12-28 21:46:18
数据库初始化完成
#==============================================================#
注册服务并启动数据库
#==============================================================#
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServiceDMDSC.service to /usr/lib/systemd/system/DmServiceDMDSC.service.
创建服务(DmServiceDMDSC)完成
Starting DmServiceDMDSC: connnect dmasmtool successfully.
[ OK ]
节点 192.168.2.37 启动成功
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServiceDMDSC.service to /usr/lib/systemd/system/DmServiceDMDSC.service.
创建服务(DmServiceDMDSC)完成
Starting DmServiceDMDSC: connnect dmasmtool successfully.
[ OK ]
节点 192.168.2.38 启动成功
#==============================================================#
创建数据库归档
#==============================================================#
在节点 192.168.2.37 创建归档
密钥过期时间:2023-11-21
操作已执行
已用时间: 2.551(毫秒). 执行号:0.
操作已执行
已用时间: 122.393(毫秒). 执行号:0.
操作已执行
已用时间: 111.464(毫秒). 执行号:0.
操作已执行
已用时间: 214.584(毫秒). 执行号:0.
操作已执行
已用时间: 8.627(毫秒). 执行号:0.
在节点 192.168.2.38 创建归档
密钥过期时间:2023-11-21
操作已执行
已用时间: 3.120(毫秒). 执行号:0.
操作已执行
已用时间: 98.810(毫秒). 执行号:0.
操作已执行
已用时间: 125.603(毫秒). 执行号:0.
操作已执行
已用时间: 220.297(毫秒). 执行号:0.
操作已执行
已用时间: 37.711(毫秒). 执行号:0.
#==============================================================#
在 192.168.2.38 创建备份
#==============================================================#
密钥过期时间:2023-11-21
NAME DESCRIBE
-------- -------------------------------------------------------------------------------
bak_full 周六全量备份,并删除30天之前的备份。
bak_inc 周日到周五做增量备份,如果失败,清除8天前备份,做全量备份
NAME COMMAND
--------- -----------------------------------------------------------------------------------------------------------
bak_clear CALL SF_BAKSET_BACKUP_DIR_ADD('DISK','/dm/dmbak/DMDSC'); CALL SP_DB_BAKSET_REMOVE_BATCH('DISK',SYSDATE-30);
#==============================================================#
优化数据库基础参数
#==============================================================#
密钥过期时间:2023-11-21
SP_SET_PARA_VALUE(2,'WORKER_THREADS', 1);
SP_SET_PARA_VALUE(2,'TASK_THREADS', 4);
SP_SET_PARA_VALUE(2,'IO_THR_GROUPS', 2);
SP_SET_PARA_VALUE(2,'MAX_OS_MEMORY', 80);
SP_SET_PARA_VALUE(2,'MEMORY_POOL', 100);
SP_SET_PARA_VALUE(2,'MEMORY_N_POOLS', 2);
SP_SET_PARA_VALUE(2,'MEMORY_TARGET', 0);
SP_SET_PARA_VALUE(2,'BUFFER', 1000);
SP_SET_PARA_VALUE(2,'MAX_BUFFER', 1000);
SP_SET_PARA_VALUE(2,'BUFFER_POOLS', 3);
SP_SET_PARA_VALUE(2,'RECYCLE', 80);
SP_SET_PARA_VALUE(2,'RECYCLE_POOLS', 2);
SP_SET_PARA_VALUE(2,'FAST_POOL_PAGES', 3000);
SP_SET_PARA_VALUE(2,'FAST_ROLL_PAGES', 1000);
SP_SET_PARA_VALUE(2,'MEMORY_MAGIC_CHECK', 1);
SP_SET_PARA_VALUE(1,'HJ_BUF_GLOBAL_SIZE', 500);
SP_SET_PARA_VALUE(1,'HJ_BUF_SIZE', 50);
SP_SET_PARA_VALUE(1,'HAGR_BUF_GLOBAL_SIZE',500);
SP_SET_PARA_VALUE(1,'HAGR_BUF_SIZE', 50);
SP_SET_PARA_VALUE(2,'SORT_FLAG', 0);
SP_SET_PARA_VALUE(2,'SORT_BLK_SIZE', 1);
SP_SET_PARA_VALUE(2,'SORT_BUF_SIZE', 2);
SP_SET_PARA_VALUE(2,'SORT_BUF_GLOBAL_SIZE',500);
SP_SET_PARA_VALUE(2,'RLOG_POOL_SIZE', 256);
SP_SET_PARA_VALUE(2,'CACHE_POOL_SIZE', 200);
SP_SET_PARA_VALUE(2,'DICT_BUF_SIZE', 50);
SP_SET_PARA_VALUE(2,'VM_POOL_TARGET', 16384);
SP_SET_PARA_VALUE(2,'SESS_POOL_TARGET', 16384);
SP_SET_PARA_VALUE(2,'USE_PLN_POOL', 1);
SP_SET_PARA_VALUE(2,'ENABLE_MONITOR', 1);
SP_SET_PARA_VALUE(2,'SVR_LOG', 0);
SP_SET_PARA_VALUE(2,'TEMP_SIZE', 1024);
SP_SET_PARA_VALUE(2,'TEMP_SPACE_LIMIT', 102400);
SP_SET_PARA_VALUE(2,'MAX_SESSIONS', 1500);
SP_SET_PARA_VALUE(2,'MAX_SESSION_STATEMENT', 20000);
SP_SET_PARA_VALUE(2,'PK_WITH_CLUSTER', 0);
SP_SET_PARA_VALUE(2,'ENABLE_ENCRYPT', 0);
SP_SET_PARA_VALUE(2,'OLAP_FLAG', 2);
SP_SET_PARA_VALUE(2,'VIEW_PULLUP_FLAG', 1);
SP_SET_PARA_VALUE(2,'OPTIMIZER_MODE', 1);
SP_SET_PARA_VALUE(2,'ADAPTIVE_NPLN_FLAG', 0);
SP_SET_PARA_VALUE(2,'PARALLEL_PURGE_FLAG', 1);
SP_SET_PARA_VALUE(2,'PARALLEL_POLICY', 2);
SP_SET_PARA_VALUE(2,'UNDO_EXTENT_NUM', 16);
SP_SET_PARA_VALUE(2,'ENABLE_INJECT_HINT', 1);
SP_SET_PARA_VALUE(2,'BTR_SPLIT_MODE', 1);
SP_SET_PARA_VALUE(2,'FAST_LOGIN', 1);
SP_SET_PARA_VALUE(1,'SVR_LOG', 1);
SP_SET_PARA_VALUE(2,'ENABLE_LOCAL_OSAUTH', 1);
SP_SET_PARA_VALUE(2,'MULTI_PAGE_GET_NUM',16);
SP_SET_PARA_VALUE(2,'PRELOAD_SCAN_NUM', 4);
SP_SET_PARA_VALUE(2,'PRELOAD_EXTENT_NUM',5);
SP_SET_PARA_VALUE(2,'DSC_N_POOLS',2);
SP_SET_PARA_VALUE(2,'DSC_GBS_REVOKE_OPT',0);
SP_SET_PARA_VALUE(2,'DSC_HALT_SYNC', 0);
SP_SET_PARA_VALUE(2,'DSC_N_CTLS', 50000);
SP_SET_PARA_VALUE(2,'DSC_ENABLE_MONITOR',0);
SP_SET_PARA_VALUE(2,'TRX_DICT_LOCK_NUM', 5);
SP_SET_PARA_VALUE(2,'ENABLE_FREQROOTS', 0);
SP_SET_PARA_VALUE(2,'DIRECT_IO', 1);
MEMORY_TARGET+BUFFER+RECYCLE+HJ_BUF_GLOBAL_SIZE+HAGR_BUF_GLOBAL_SIZE+CACHE_POOL_SIZE+DICT_BUF_SIZE+SORT_BUF_GLOBAL_SIZE+RLOG_POO
--------------------------------------------------------------------------------------------------------------------------------
3086
重启数据库,优化参数生效
关闭数据库
[monitor] 2022-12-28 21:47:17: CSS MONITOR V8
[monitor] 2022-12-28 21:47:17: CSS MONITOR SYSTEM IS READY.
[monitor] 2022-12-28 21:47:17: Wait CSS Control Node choosed...
[monitor] 2022-12-28 21:47:18: Wait CSS Control Node choosed succeed.
[monitor] 2022-12-28 21:47:18: 组(GRP_DMDSC)中节点对应的CSS自动拉起标记已经处于关闭状态
[monitor] 2022-12-28 21:47:18: 通知CSS(seqno:0)执行EP STOP(GRP_DMDSC)
[monitor] 2022-12-28 21:47:25: 通知当前活动的CSS执行清理操作
[monitor] 2022-12-28 21:47:26: 清理CSS(0)请求成功
[monitor] 2022-12-28 21:47:26: 清理CSS(1)请求成功
[monitor] 2022-12-28 21:47:26: 命令EP STOP GRP_DMDSC执行成功
启动数据库
[monitor] 2022-12-28 21:47:32: CSS MONITOR V8
[monitor] 2022-12-28 21:47:32: CSS MONITOR SYSTEM IS READY.
[monitor] 2022-12-28 21:47:32: Wait CSS Control Node choosed...
[monitor] 2022-12-28 21:47:34: Wait CSS Control Node choosed succeed.
[monitor] 2022-12-28 21:47:34: 通知CSS(seqno:0)执行EP STARTUP(DMDSC0)
[monitor] 2022-12-28 21:47:42: 通知CSS(seqno:0)执行EP STARTUP(DMDSC0)成功
[monitor] 2022-12-28 21:47:42: 通知CSS(seqno:1)执行EP STARTUP(DMDSC1)
[monitor] 2022-12-28 21:47:53: 通知CSS(seqno:1)执行EP STARTUP(DMDSC1)成功
[monitor] 2022-12-28 21:47:53: 通知CSS(seqno:0)打开节点(DMDSC0)的自动拉起功能
[monitor] 2022-12-28 21:47:54: 通知CSS(seqno:0)打开节点(DMDSC0)的自动拉起功能成功
[monitor] 2022-12-28 21:47:54: 通知CSS(seqno:1)打开节点(DMDSC1)的自动拉起功能
[monitor] 2022-12-28 21:47:54: 通知CSS(seqno:1)打开节点(DMDSC1)的自动拉起功能成功
[monitor] 2022-12-28 21:47:54: 打开CSS自动拉起功能成功
[monitor] 2022-12-28 21:47:54: 通知当前活动的CSS执行清理操作
[monitor] 2022-12-28 21:47:55: 清理CSS(0)请求成功
[monitor] 2022-12-28 21:47:55: 清理CSS(1)请求成功
[monitor] 2022-12-28 21:47:55: 命令EP STARTUP GRP_DMDSC执行成功
#==============================================================#
创建DMDBA用户,密码:SYSDBA
#==============================================================#
密钥过期时间:2023-11-21
USERNAME
----------
SYSAUDITOR
SYSSSO
SYSDBA
DMDBA
SYS
#==============================================================#
查询数据库优化结果:
#==============================================================#
密钥过期时间:2023-11-21
PARA_NAME DEFAULT_VALUE PARA_VALUE
--------------------- ------------- ----------
MAX_OS_MEMORY 100 80
MAX_SESSION_STATEMENT 10000 20000
TRX_VIEW_MODE 1 1
MAX_SESSIONS 10000 1500
IO_THR_GROUPS 8 2
ADAPTIVE_NPLN_FLAG 3 0
OPTIMIZER_MODE 1 1
TOP_DIS_HASH_FLAG 1 1
TOP_ORDER_OPT_FLAG 0 0
VIEW_PULLUP_FLAG 0 1
USE_PLN_POOL 1 1
TASK_THREADS 16 16
WORKER_THREADS 16 1
SESS_POOL_TARGET 16384 16384
SESS_POOL_SIZE 64 64
VM_POOL_TARGET 16384 16384
DICT_BUF_SIZE 50 50
HAGR_BUF_SIZE 500 50
HAGR_BUF_GLOBAL_SIZE 5000 1000
HJ_BUF_SIZE 500 50
HJ_BUF_GLOBAL_SIZE 5000 1000
SORT_FLAG 0 0
SORT_BUF_GLOBAL_SIZE 1000 500
SORT_BLK_SIZE 1 1
SORT_BUF_SIZE 20 2
MAX_BUFFER 1000 1000
RECYCLE_POOLS 3 1
RECYCLE 300 80
BUFFER_POOLS 9 3
BUFFER 1000 1000
MEMORY_MAGIC_CHECK 1 1
MEMORY_TARGET 15000 0
MEMORY_N_POOLS 1 2
MEMORY_POOL 500 100
PK_WITH_CLUSTER 0 0
ENABLE_MONITOR 1 1
SVR_LOG 0 1
DATETIME_FMT_MODE 0 0
COMPATIBLE_MODE 0 0
CLOB_LIKE_MAX_LEN 10240 10240
ENABLE_ENCRYPT 0 0
REDOS_PARALLEL_NUM 1 1
RLOG_POOL_SIZE 256 256
CACHE_POOL_SIZE 100 200
TEMP_SPACE_LIMIT 0 102400
TEMP_SIZE 10 1024
OLAP_FLAG 2 2
恭喜您,达梦数据库DMDSC已经安装完成!
[root@centos7 soft]#
[root@centos7 soft]#
[root@centos7 soft]# su - dmdba
[dmdba@dsc01:~]$ dmcssm /dm/dm
dmbak/ dmdata/ dmdbms/
[dmdba@dsc01:~]$ dmcssm /dm/dmdata/DMDSC/
asmdisk.txt dmasvrmal.ini dmcssm.ini dmdcr_cfg.ini dmdcr.ini dmdsc0_config/ dmdsc1_config/ dminit.ini
[dmdba@dsc01:~]$ dmcssm /dm/dmdata/DMDSC/dmcssm.ini
[monitor] 2022-12-28 21:48:57: CSS MONITOR V8
[monitor] 2022-12-28 21:48:57: CSS MONITOR SYSTEM IS READY.
[monitor] 2022-12-28 21:48:57: Wait CSS Control Node choosed...
[monitor] 2022-12-28 21:48:58: Wait CSS Control Node choosed succeed.
show
monitor current time:2022-12-28 21:48:59, n_group:3
=================== group[name = GRP_CSS, seq = 0, type = CSS, Control Node = 0] ========================================
[CSS0] auto check = TRUE, global info:
[ASM0] auto restart = FALSE
[DMDSC0] auto restart = TRUE
[CSS1] auto check = TRUE, global info:
[ASM1] auto restart = FALSE
[DMDSC1] auto restart = TRUE
ep: css_time inst_name seqno port mode inst_status vtd_status is_ok active guid ts
2022-12-28 21:48:59 CSS0 0 12346 Control Node OPEN WORKING OK TRUE 528676 528959
2022-12-28 21:48:59 CSS1 1 12346 Normal Node OPEN WORKING OK TRUE 535490 535753
=================== group[name = GRP_ASM, seq = 1, type = ASM, Control Node = 0] ========================================
n_ok_ep = 2
ok_ep_arr(index, seqno):
(0, 0)
(1, 1)
sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL
crash process over flag is TRUE
ep: css_time inst_name seqno port mode inst_status vtd_status is_ok active guid ts
2022-12-28 21:48:59 ASM0 0 12345 Control Node OPEN WORKING OK TRUE 543245 543485
2022-12-28 21:48:59 ASM1 1 12345 Normal Node OPEN WORKING OK TRUE 550042 550262
=================== group[name = GRP_DMDSC, seq = 2, type = DB, Control Node = 0] ========================================
n_ok_ep = 2
ok_ep_arr(index, seqno):
(0, 0)
(1, 1)
sta = OPEN, sub_sta = STARTUP
break ep = NULL
recover ep = NULL
crash process over flag is TRUE
ep: css_time inst_name seqno port mode inst_status vtd_status is_ok active guid ts
2022-12-28 21:48:59 DMDSC0 0 5236 Control Node OPEN WORKING OK TRUE 1290850 1290926
2022-12-28 21:48:59 DMDSC1 1 5236 Normal Node OPEN WORKING OK TRUE 1298275 1298341
==================================================================================================================
exit
[dmdba@dsc01:~]$ exit
登出
[root@centos7 soft]#
[root@centos7 soft]#
[END] 2022/12/28 14:59:04
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。