操作系统:Alibaba Cloud Linux
配置:2C 4G
[dmdba@lxm ~]$ cat /etc/os-release
NAME="Alibaba Cloud Linux"
VERSION="3 (Soaring Falcon)"
ID="alinux"
ID_LIKE="rhel fedora centos anolis"
VERSION_ID="3"
PLATFORM_ID="platform:al8"
PRETTY_NAME="Alibaba Cloud Linux 3 (Soaring Falcon)"
ANSI_COLOR="0;31"
HOME_URL="https://www.aliyun.com/"
[dmdba@lxm ~]$ lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: AlibabaCloud
Description: Alibaba Cloud Linux release 3 (Soaring Falcon)
Release: 3
Codename: SoaringFalcon
[dmdba@lxm ~]$ uname -a
Linux lxm 5.10.84-10.4.al8.x86_64 #1 SMP Tue Apr 12 12:31:07 CST 2022 x86_64 x86_64 x86_64 GNU/Linux
1.服务器内存大小1G以上,磁盘空间大小也要在1G以上。
2.尽量不使用root用户安装。
3.初始化实例时页大小,字符集,大小写是否敏感都是后期不可修改的,需要提前规划好。
[root@lxm ~]# groupadd -g 12349 dinstall
[root@lxm ~]# useradd -u 12345 -g dinstall-m -d /home/dmdba -s /bin/bash dmdba
[root@lxm ~]# passwd dmdba
Changing password for user dmdba.
New password:
BAD PASSWORD: The password fails thedictionary check - it is too simplistic/systematic
Retype new password:
passwd: all authentication tokens updated successfully.
[root@lxm ~]# rz
[root@lxm ~]# ls
dm8_20220525_x86_rh6_64.zip
[root@lxm ~]# unzip dm8_20220525_x86_rh6_64.zip
Archive: dm8_20220525_x86_rh6_64.zip
creating: dm8_20220525_x86_rh6_64_ent/
inflating: dm8_20220525_x86_rh6_64_ent/dm8_20220525_x86_rh6_64.iso
inflating:dm8_20220525_x86_rh6_64_ent/dm8_20220525_x86_rh6_64.iso_SHA256.txt
[root@lxm ~]# ls -lrth
total 898M
drwxr-xr-x 2 root root 4.0K Jun 14 14:56dm8_20220525_x86_rh6_64_ent
-rw-r--r-- 1 root root 898M Jun 16 12:02dm8_20220525_x86_rh6_64.zip
[root@lxm ~]# cd dm8_20220525_x86_rh6_64_ent/
[root@lxm dm8_20220525_x86_rh6_64_ent]# ls-lrth
total 911M
-rw-r--r-- 1 root root 911M Jun 14 14:23dm8_20220525_x86_rh6_64.iso
-rw-r--r-- 1 root root 167 Jun 14 14:23dm8_20220525_x86_rh6_64.iso_SHA256.txt [root@lxm dm8_20220525_x86_rh6_64_ent]#cd ..
[root@lxm ~]# mount -o loop dm8_20220525_x86_rh6_64_ent/dm8_20220525_x86_rh6_64.iso /mnt
mount: /mnt: WARNING: devicewrite-protected, mounted read-only.
[root@lxm ~]# cd /mnt
[root@lxm mnt]# ls -lrth
total 910M
-r-xr-xr-x 1 root root 2.7M May 25 15:31'DM8 Install.pdf'
-r-xr-xr-x 1 root root 908M May 2515:37 DMInstall.bin
[root@lxm mnt]# ls -lrth
total 910M
-r-xr-xr-x 1 root root 2.7M May 25 15:31'DM8 Install.pdf'
-r-xr-xr-x 1 root root 908M May 2515:37 DMInstall.bin
[root@lxm mnt]# su - dmdba
Last login: Thu Jun 16 20:12:15 CST 2022 onpts/0
[dmdba@lxm ~]$ cd /mnt
[root@lxm mnt]# ls -lrth
total 910M
-r-xr-xr-x 1 root root 2.7M May 25 15:31'DM8 Install.pdf'
-r-xr-xr-x 1 root root 908M May 2515:37 DMInstall.bin
[dmdba@lxm mnt]$ ./DMInstall.bin -i
Please select the installer's language(E/e:English C/c:Chinese) [E/e]:e
Extract install files.........
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 14758
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 65535
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 14758
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
The max number of open files is too little,suggest to set 65536 or more to number of open files.
Welcome to DM DBMS Installer
Whether to input the path of Key File?(Y/y:Yes N/n:No) [Y/y]:n
Whether to Set The TimeZone? (Y/y:YesN/n:No) [Y/y]:y
TimeZone:
[ 1]: GTM-12=West Date Line
[ 2]: GTM-11=Samoa
[ 3]: GTM-10=Hawaii
[ 4]: GTM-09=Alaska
[ 5]: GTM-08=Pacific(America and Canada)
[ 6]: GTM-07=Arizona
[ 7]: GTM-06=Central(America and Canada)
[ 8]: GTM-05=East(America and Canada)
[ 9]: GTM-04=Atlantic(America and Canada)
[10]: GTM-03=Brasilia
[11]: GTM-02=Middle Atlantic
[12]: GTM-01=Azores
[13]: GTM=Greenwich Mean Time
[14]: GTM+01=Sarajevo
[15]: GTM+02=Cairo
[16]: GTM+03=Moscow
[17]: GTM+04=AbuDhabi
[18]: GTM+05=Islamabad
[19]: GTM+06=Dakar
[20]: GTM+07=BangKok,Hanoi
[21]: GTM+08=China
[22]: GTM+09=Seoul
[23]: GTM+10=Guam
[24]: GTM+11=Solomon
[25]: GTM+12=Fiji
[26]: GTM+13=Nukualofa
[27]: GTM+14=Kiribati
Please Select the TimeZone [21]:21
Installation Type:
1 Typical
2 Server
3 Client
4 Custom
Please Input the number of the InstallationType [1 Typical]:1
Require Space: 1585M
Please Input the install path[/home/dmdba/dmdbms]:
Available Space:31G
Please Confirm the installpath(/home/dmdba/dmdbms)? (Y/y:Yes N/n:No) [Y/y]:y
Pre-Installation Summary
Installation Location: /home/dmdba/dmdbms
Require Space: 1585M
Available Space: 31G
Version Information:
Expire Date:
Installation Type: Typical
Confirm to Install? (Y/y:Yes N/n:No):y
2022-06-16 20:30:34
[INFO] Installing DM DBMS...
2022-06-16 20:30:34
[INFO] Installing BASE Module...
2022-06-16 20:30:36
[INFO] Installing SERVER Module...
2022-06-16 20:30:39
[INFO] Installing CLIENT Module...
2022-06-16 20:30:40
[INFO] Installing DRIVERS Module...
2022-06-16 20:30:49
[INFO] Installing MANUAL Module...
2022-06-16 20:30:52
[INFO] Installing SERVICE Module...
2022-06-16 20:30:53
[INFO] Move log file to log directory.
2022-06-16 20:30:54
[INFO] Installed DM DBMS completely.
Please execute the commands by root:
/home/dmdba/dmdbms/script/root/root_installer.sh
End
/dm8/script/root/root_installer.sh
创建 DmAPService,否则会影响数据库备份[dmdba@lxm mnt]$ logout
[root@lxm mnt]# sh /home/dmdba/dmdbms/script/root/root_installer.sh
Move /home/dmdba/dmdbms/bin/dm_svc.conf to/etc
Modify the files' mode of DM Server
Create the DmAPService service
Created symlink/etc/systemd/system/multi-user.target.wants/DmAPService.service →/usr/lib/systemd/system/DmAPService.service.
Finished to create the service(DmAPService)
Start the DmAPService service
[root@lxm root]# vim /home/dmdba/.bash_profile
export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool
[root@lxm root]# su - dmdba
Last login: Thu Jun 16 22:04:28 CST 2022 onpts/0
[dmdba@lxm ~]$ source .bash_profile
[dmdba@lxm ~]$ cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/home/dmdba/dmdbms/bin"
export DM_HOME="/home/dmdba/dmdbms"
export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool
实例路径:/home/dmdba/dmdbms/data
页大小:32K
簇大小:32
大小写是否敏感:是
字符集:UTF-8
端口:5237
实例名:DBSERVER
数据库名:DMDB
[dmdba@lxm bin]$ ./dminit path=/home/dmdba/dmdbms/data PAGE_SIZE=32 EXTENT_SIZE=32 CASE_SENSITIVE=y CHARSET=1 DB_NAME=DMDB INSTANCE_NAME=DBSERVER PORT_NUM=5237
initdb V8
db version: 0x7000c
file dm.key not found, use default license!
License will expire on 2023-05-25
Normal of FAST
Normal of DEFAULT
Normal of RECYCLE
Normal of KEEP
Normal of ROLL
logfile path: /home/dmdba/dmdbms/data/DMDB/DMDB01.log
logfile path: /home/dmdba/dmdbms/data/DMDB/DMDB02.log
write to dir[/home/dmdba/dmdbms/data/DMDB].
create dm database success. 2022-06-1621:06:36
[dmdba@lxm bin]$ tree /home/dmdba/dmdbms/data
/home/dmdba/dmdbms/data
└── DMDB
├── bak
├── ctl_bak
│ ├── dm_20220616210636_121929.ctl
│ └── dm_20220616211322_448147.ctl
├── dm.ctl
├── DMDB01.log
├── DMDB02.log
├── dm.ini
├── dminit20220616210633.log
├── dm_service.prikey
├── HMAIN
├── MAIN.DBF
├── rep_conflict.log
├── ROLL.DBF
├── sqllog.ini
├── SYSTEM.DBF
├── TEMP.DBF
└── trace
5 directories, 14 files
[dmdba@lxm dmdbms]$ ls -lrth
total 80K
drwxr-xr-x 7 dmdba dinstall 4.0K Jun 16 20:30 jdk
drwxr-xr-x 3 dmdba dinstall 4.0K Jun 16 20:30 desktop
-rwxr-xr-x 1 dmdba dinstall 1.2K Jun 16 20:30 license_zh.txt
-rwxr-xr-x 1 dmdba dinstall 1.1K Jun 16 20:30 license_en.txt
drwxr-xr-x 3 dmdba dinstall 4.0K Jun 16 20:30 script
drwxr-xr-x 2 dmdba dinstall 4.0K Jun 16 20:30 include
drwxr-xr-x 6 dmdba dinstall 4.0K Jun 16 20:30 samples
drwxr-xr-x 2 dmdba dinstall 4.0K Jun 16 20:30 jar
drwxr-xr-x 2 dmdba dinstall 4.0K Jun 16 20:30 bin2
drwxr-xr-x 9 dmdba dinstall 4.0K Jun 16 20:30 tool
drwxr-xr-x 3 dmdba dinstall 4.0K Jun 16 20:30 web
drwxr-xr-x 12 dmdba dinstall 4.0K Jun 1620:30 drivers
drwxr-xr-x 2 dmdba dinstall 4.0K Jun 16 20:30 doc
-rwxr-xr-x 1 dmdba dinstall 2.1K Jun 16 20:30 uninstall.sh
drwxr-xr-x 3 dmdba dinstall 4.0K Jun 16 20:30 uninstall
drwxr-xr-x 3 dmdba dinstall 4.0K Jun 16 21:06 data
drwxr-xr-x 10 dmdba dinstall 12K Jun 16 21:10 bin
drwxr-xr-x 2 dmdba dinstall 4.0K Jun 16 21:13 log
[dmdba@lxm dmdbms]$ cd script/root/
[dmdba@lxm root]$ ls
dm_service_installer.sh dm_service_uninstaller.sh root_installer.sh
[dmdba@lxm root]$ ./dm_service_installer.sh -t dmserver -dm_ini /home/dmdba/dmdbms/data/DMDB/dm.ini -p DMSERVER
Must run the script by root!
[dmdba@lxm root]$ pwd
/home/dmdba/dmdbms/script/root
[dmdba@lxm root]$ logout
[root@lxm dmdba]# cd /home/dmdba/dmdbms/script/root
[root@lxm root]# ./dm_service_installer.sh -t dmserver -dm_ini/home/dmdba/dmdbms/data/DMDB/dm.ini -p DMSERVER
Created symlink/etc/systemd/system/multi-user.target.wants/DmServiceDMSERVER.service →/usr/lib/systemd/system/DmServiceDMSERVER.service.
Finished to create the service(DmServiceDMSERVER)
[root@lxm root]# systemctl start DmServiceDMSERVER.service
[root@lxm root]# systemctl status DmServiceDMSERVER.service
● DmServiceDMSERVER.service - DM InstanceService(DmServiceDMSERVER).
Loaded: loaded (/usr/lib/systemd/system/DmServiceDMSERVER.service;enabled; vendor preset: enabled)
Active: active (running) since Thu 2022-06-16 21:13:31 CST; 27s ago
Process: 21723 ExecStart=/home/dmdba/dmdbms/bin/DmServiceDMSERVER start(code=exited, status=0/SUCCESS)
MainPID: 21747 (dmserver)
Tasks: 65
Memory: 547.4M
CGroup: /system.slice/DmServiceDMSERVER.service
└─21747 /home/dmdba/dmdbms/bin/dmserverpath=/home/dmdba/dmdbms/data/DMDB/dm.ini -noconsole
Jun 16 21:13:16 lxm systemd[1]: Starting DMInstance Service(DmServiceDMSERVER)....
Jun 16 21:13:31 lxmDmServiceDMSERVER[21723]: [39B blob data]
Jun 16 21:13:31 lxm systemd[1]: Started DMInstance Service(DmServiceDMSERVER)
[dmdba@lxm ~]$ netstat -ntlp |grep dmserver
(Not all processes could be identified, non-owned process infos
will not be shown, you would have to be root to see it all.)
tcp6 0 0 :::5237 :::* LISTEN 21747/dmserver
更多内容参见达梦技术社区:https://eco.dameng.com