达梦8数据库安装步骤
1:建立用户组和用户
[root@tjdameng ~]# groupadd dinstall
[root@tjdameng ~]# useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba
[root@tjdameng ~]# passwd dmdba
2:修改dmdba用户资源限制
[root@tjdameng ~]# vim /etc/security/limits.conf
在末尾加入
dmdba soft core unlimited
dmdba hard core unlimited
dmdba soft nofile 65536
dmdba hard nofile 65536
dmdba soft nproc 65536
dmdba hard nproc 65536
dmdba soft stack 65536
dmdba hard stack 65536
3:更改dmdba用户环境变量
[root@tjdameng ~]# vim /home/dmdba/.bash_profile
在末尾加入
export DM_HOME=/dm8
export PATH=
P
A
T
H
:
PATH:
PATH:DM_HOME/bin
export LD_LIBRARY_PATH=
L
D
L
I
B
R
A
R
Y
P
A
T
H
:
LD_LIBRARY_PATH:
LDLIBRARYPATH:DM_HOME/bin
4:挂载镜像到opt下
[root@tjdameng ~]# mount -o loop /opt/dm8_20201107_x86_rh6_64_ent_8.1.1.144.iso /mnt
5:新建安装目录并给其权限
[root@tjdameng /]# mkdir /dm8
[root@tjdameng /]# chown dmdba:dinstall -R /dm8/
[root@tjdameng /]# chmod -R 755 /dm8
6:执行DMInstall.bin开始安装
[dmdba@tjdameng mnt]$ ./DMInstall.bin -i
7:按照上图系统提示执行脚本
[root@tjdameng /]# /dm8/script/root/root_installer.sh
8:使用dminit工具初始化实例
[dmdba@tjdameng bin]$ ./dminit path=/dm8/data
9:设置页大小为 32 KB,簇大小为 32 KB,大小写敏感,字符集为 utf_8,数据库名为 DMDB,实例名为 DBSERVER,端口为 5237。
[dmdba@tjdameng bin]$ ./dminit path=/dm8/data PAGE_SIZE=32 EXTENT_SIZE=32 CASE_SENSITIVE=y CHARSET=1 DB_NAME=DMDB INSTANCE_NAME=DBSERVER PORT_NUM=5237
10:注册服务
[root@tjdameng /]# cd /dm8/script/root
[root@tjdameng root]# ./dm_service_installer.sh -t dmserver -dm_ini /dm8/data/DAMENG/dm.ini -p DMSERVER
用户可根据自己的环境更改 dm.ini 文件的路径以及服务名
[root@tjdameng root]# ./dm_service_installer.sh -h 查询
11:启动,停止,重启,查询状态数据库
systemctl start/stop/restart/status DmServiceDMSERVER.service
12:连接数据库
[root@tjdameng root]# cd /dm8/bin
[root@tjdameng bin]# ./disql SYSDBA/SYSDBA@localhost:5236
达梦云适配技术社区
https://eco.dameng.com/