dm8+centos7单机安装

[root@pg01 ~]# pwd
/root
[root@pg01 ~]# groupadd dinstall
[root@pg01 ~]# useradd -g dinstall dmdba
[root@pg01 ~]# passwd dmdba
Changing password for user dmdba.
New password: 
BAD PASSWORD: The password is shorter than 8 characters
Retype new password: 
passwd: all authentication tokens updated successfully.
[root@pg01 ~]# mkdir /dm8
[root@pg01 ~]# chown -R dmdba:dinstall /dm8
[root@pg01 ~]# chmod -R 755 /dm8
[root@pg01 ~]# vi /etc/security/limits.conf 

dmdba hard nofile 65536
dmdba soft nofile 65536
dmdba hard stack 32768
dmdba soft stack 16384

"/etc/security/limits.conf" 66L, 2517C written
[root@pg01 ~]# su - dmdb
su: user dmdb does not exist
[root@pg01 ~]# su - dmdba
[dmdba@pg01 ~]$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 7183
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 65536
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 16384
cpu time               (seconds, -t) unlimited
max user processes              (-u) 4096
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
[dmdba@pg01 ~]$ exit
logout
[root@pg01 ~]# systemctl disable firewalld
[root@pg01 ~]# systemctl stop firewalld
[root@pg01 ~]# pwd
/root
[root@pg01 ~]# ll
total 821820
-rw-r--r--. 1 root root 776092592 Sep  2 11:05 dm8_20210818_x86_rh7_64_ent.zip  介质准备:https://eco.dameng.com/download/
[root@pg01 ~]# unzip dm8_20210818_x86_rh7_64_ent.zip 
Archive:  dm8_20210818_x86_rh7_64_ent.zip
   creating: dm8_20210818_x86_rh7_64_ent/
  inflating: dm8_20210818_x86_rh7_64_ent/dm8_20210818_x86_rh7_64_ent_8.1.2.18_pack13.iso_SHA256.txt  
  inflating: dm8_20210818_x86_rh7_64_ent/dm8_20210818_x86_rh7_64_ent_8.1.2.18_pack13.iso  
[root@pg01 ~]# cd dm8_20210818_x86_rh7_64_ent
[root@pg01 dm8_20210818_x86_rh7_64_ent]# ll
total 769312
-rw-r--r--. 1 root root 787769344 Aug 20 09:06 dm8_20210818_x86_rh7_64_ent_8.1.2.18_pack13.iso
-rw-r--r--. 1 root root       167 Aug 20 09:06 dm8_20210818_x86_rh7_64_ent_8.1.2.18_pack13.iso_SHA256.txt
[root@pg01 dm8_20210818_x86_rh7_64_ent]# mount -o loop /root/dm8_20210818_x86_rh7_64_ent/dm8_20210818_x86_rh7_64_ent_8.1.2.18_pack13.iso /mnt
mount: /dev/loop0 is write-protected, mounting read-only
[root@pg01 dm8_20210818_x86_rh7_64_ent]# df -h
Filesystem               Size  Used Avail Use% Mounted on
devtmpfs                 898M     0  898M   0% /dev
tmpfs                    910M   16K  910M   1% /dev/shm
tmpfs                    910M  9.5M  901M   2% /run
tmpfs                    910M     0  910M   0% /sys/fs/cgroup
/dev/mapper/centos-root   17G  3.8G   14G  22% /
/dev/sda1               1014M  150M  865M  15% /boot
tmpfs                    182M     0  182M   0% /run/user/0
/dev/loop0               752M  752M     0 100% /mnt
[root@pg01 dm8_20210818_x86_rh7_64_ent]# cd /mnt
[root@pg01 mnt]# ll
total 769244
-r-xr-xr-x. 1 root root   2784248 Aug 18 17:44 DM8 Install.pdf
-r-xr-xr-x. 1 root root 784920869 Aug 18 17:47 DMInstall.bin
[root@pg01 mnt]# su - dmdba
Last login: Thu Sep  2 10:19:55 CST 2021 on pts/0
[dmdba@pg01 ~]$ cd /dmnt
-bash: cd: /dmnt: No such file or directory
[dmdba@pg01 ~]$ cd /mnt
[dmdba@pg01 mnt]$ ll
total 769244
-r-xr-xr-x. 1 root root   2784248 Aug 18 17:44 DM8 Install.pdf
-r-xr-xr-x. 1 root root 784920869 Aug 18 17:47 DMInstall.bin
[dmdba@pg01 mnt]$ ./DMInstall.bin -i
Please select the installer's language (E/e:English C/c:Chinese) [E/e]:C
解压安装程序..........
欢迎使用达梦数据库安装程序

是否输入Key文件路径? (Y/y:是 N/n:否) [Y/y]:n  

是否设置时区? (Y/y:是 N/n:否) [Y/y]:Y
设置时区:
[ 1]: GTM-12=日界线西
[ 2]: GTM-11=萨摩亚群岛
[ 3]: GTM-10=夏威夷
[ 4]: GTM-09=阿拉斯加
[ 5]: GTM-08=太平洋时间(美国和加拿大)
[ 6]: GTM-07=亚利桑那
[ 7]: GTM-06=中部时间(美国和加拿大)
[ 8]: GTM-05=东部部时间(美国和加拿大)
[ 9]: GTM-04=大西洋时间(美国和加拿大)
[10]: GTM-03=巴西利亚
[11]: GTM-02=中大西洋
[12]: GTM-01=亚速尔群岛
[13]: GTM=格林威治标准时间
[14]: GTM+01=萨拉热窝
[15]: GTM+02=开罗
[16]: GTM+03=莫斯科
[17]: GTM+04=阿布扎比
[18]: GTM+05=伊斯兰堡
[19]: GTM+06=达卡
[20]: GTM+07=曼谷,河内
[21]: GTM+08=中国标准时间
[22]: GTM+09=汉城
[23]: GTM+10=关岛
[24]: GTM+11=所罗门群岛
[25]: GTM+12=斐济
[26]: GTM+13=努库阿勒法
[27]: GTM+14=基里巴斯
请选择设置时区 [21]:21

安装类型:
1 典型安装
2 服务器
3 客户端
4 自定义
请选择安装类型的数字序号 [1 典型安装]:1
所需空间: 1263M

请选择安装目录 [/home/dmdba/dmdbms]:/dm8
可用空间: 12G
是否确认安装路径(/dm8)? (Y/y:是 N/n:否)  [Y/y]:

安装前小结
安装位置: /dm8
所需空间: 1263M
可用空间: 12G
版本信息: 
有效日期: 
安装类型: 典型安装
是否确认安装? (Y/y:是 N/n:否):Y
2021-09-02 11:20:36 
[INFO] 安装达梦数据库...
2021-09-02 11:20:37 
[INFO] 安装 基础 模块...
2021-09-02 11:20:40 
[INFO] 安装 服务器 模块...
2021-09-02 11:20:40 
[INFO] 安装 客户端 模块...
2021-09-02 11:20:42 
[INFO] 安装 驱动 模块...
2021-09-02 11:20:43 
[INFO] 安装 手册 模块...
2021-09-02 11:20:43 
[INFO] 安装 服务 模块...
2021-09-02 11:20:44 
[INFO] 移动日志文件。
2021-09-02 11:20:44 
[INFO] 安装达梦数据库完成。

请以root系统用户执行命令:
/dm8/script/root/root_installer.sh

安装结束

[dmdba@pg01 mnt]$ exit
logout
[root@pg01 mnt]# /dm8/script/root/root_installer.sh
移动 /dm8/bin/dm_svc.conf 到/etc目录
修改服务器权限
创建DmAPService服务
Created symlink from /etc/systemd/system/multi-user.target.wants/DmAPService.service to /usr/lib/systemd/system/DmAPService.service.
创建服务(DmAPService)完成
启动DmAPService服务

[root@pg01 mnt]# su - dmdba
Last login: Thu Sep  2 11:18:55 CST 2021 on pts/0
[dmdba@pg01 ~]$ vi .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/dm8/bin"
export DM_HOME="/dm8"
export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool
~
~
".bash_profile" 16L, 312C written
[dmdba@pg01 ~]$ cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
        . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH

export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/dm8/bin"
export DM_HOME="/dm8"
export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool
[dmdba@pg01 ~]$ source .bash_profile
[dmdba@pg01 ~]$ dminit PATH=/dm8/data DB_NAME=DAMENG INSTANCE_NAME=DMSERVER PORT_NUM=5236
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2022-08-10
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL

 log file path: /dm8/data/DAMENG/DAMENG01.log


 log file path: /dm8/data/DAMENG/DAMENG02.log

write to dir [/dm8/data/DAMENG].
create dm database success. 2021-09-02 11:23:02
[dmdba@pg01 ~]$ cd /dm8/script/root
[dmdba@pg01 root]$ ./dm_service_installer.sh -t dmserver -p DMSERVER -dm_ini /dm8/data/DAMENG/dm
dm.ctl                    dm.ini                    dminit20210902112259.log  dm_service.prikey         
[dmdba@pg01 root]$ ./dm_service_installer.sh -t dmserver -p DMSERVER -dm_ini /dm8/data/DAMENG/dm.ini
必须以 root 身份执行此脚本!
[dmdba@pg01 root]$ pwd
/dm8/script/root
[dmdba@pg01 root]$ exit
logout
[root@pg01 mnt]# cd /dm8/script/root
[root@pg01 root]# ./dm_service_installer.sh -t dmserver -p DMSERVER -dm_ini /dm8/data/DAMENG/dm.ini
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServiceDMSERVER.service to /usr/lib/systemd/system/DmServiceDMSERVER.service.
创建服务(DmServiceDMSERVER)完成
[root@pg01 root]# systemctl enable DmServiceDMSERVER
[root@pg01 root]# systemctl start DmServiceDMSERVER
[root@pg01 root]# systemctl status DmServiceDMSERVER
● DmServiceDMSERVER.service - Dameng Database Service(DmServiceDMSERVER).
   Loaded: loaded (/usr/lib/systemd/system/DmServiceDMSERVER.service; enabled; vendor preset: disabled)
   Active: active (running) since Thu 2021-09-02 11:25:31 CST; 7s ago
  Process: 4722 ExecStart=/dm8/bin/DmServiceDMSERVER start (code=exited, status=0/SUCCESS)
 Main PID: 4746 (dmserver)
   CGroup: /system.slice/DmServiceDMSERVER.service
           └─4746 /dm8/bin/dmserver /dm8/data/DAMENG/dm.ini -noconsole

Sep 02 11:25:16 pg01 systemd[1]: Starting Dameng Database Service(DmServiceDMSERVER)....
Sep 02 11:25:31 pg01 DmServiceDMSERVER[4722]: [39B blob data]
Sep 02 11:25:31 pg01 systemd[1]: Started Dameng Database Service(DmServiceDMSERVER)..
[root@pg01 root]# ps -ef |grep dmserver
dmdba      4746      1  7 11:25 ?        00:00:02 /dm8/bin/dmserver /dm8/data/DAMENG/dm.ini -noconsole
root       4814   1545  0 11:25 pts/0    00:00:00 grep --color=auto dmserver
[root@pg01 root]# su - dmdba
Last login: Thu Sep  2 11:21:43 CST 2021 on pts/0
[dmdba@pg01 ~]$ cd /dm8/tool
[dmdba@pg01 tool]$ disql
disql V8
用户名:sysdba

服务器[LOCALHOST:5236]:处于普通打开状态
登录使用时间 : 3.529(ms)
SQL> select * from v$database;

行号     NAME   CREATE_TIME         ARCH_MODE LAST_CKPT_TIME STATUS$     ROLE$       MAX_SIZE             TOTAL_SIZE           DSC_NODES  
---------- ------ ------------------- --------- -------------- ----------- ----------- -------------------- -------------------- -----------
           OPEN_COUNT  STARTUP_COUNT        LAST_STARTUP_TIME  
           ----------- -------------------- -------------------
1          DAMENG 2021-09-02 11:23:02 N         NULL           4           0           0                    20608                1
           1           1                    2021-09-02 11:25:26


已用时间: 2.618(毫秒). 执行号:50600.
SQL> select * from v$version;

行号     BANNER                   
---------- -------------------------
1          DM Database Server 64 V8 
2          DB Version: 0x7000c

已用时间: 0.423(毫秒). 执行号:50601.
SQL> exit
[dmdba@pg01 tool]$ 

相关参考:

https://blog.csdn.net/weixin_53124528/article/details/110426150