在之前的博客,我们了解的DM7 单实例的安装,如下:
Linux 平台 达梦 DM7 单实例 安装手册 详细截图版
https://www.cndba.cn/dave/article/3565
DM的安装步骤和DM7 并无差别。 这里简要记录如下。
1 准备工作
安装好Linux操作系统,这里选择的是Linux 7:
[dave@www.cndba.cn /]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
[dave@www.cndba.cn /]#
关闭防火墙 和 Selinux:
[dave@www.cndba.cn /]# systemctl stop firewalld
[dave@www.cndba.cn /]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[dave@www.cndba.cn /]# vi /etc/selinux/config
[root@dm1 ~]# cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
修改/etc/hosts 文件:
[dave@www.cndba.cn /]# cat /etc/hosts
127.0.0.1 localhost
192.168.20.171 dm8
[dave@www.cndba.cn /]#
创建DM用户:
[dave@www.cndba.cn /]# groupadd dinstall
[dave@www.cndba.cn /]# useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba
[dave@www.cndba.cn /]# 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.
[dave@www.cndba.cn /]#
创建目录:存储dm数据库文件的空间需要提前规划并挂载好,我这里放在/dm目录下:
[dave@www.cndba.cn /]# mkdir -p /dm/dmdbms
[dave@www.cndba.cn /]# chown -R dmdba:dinstall /dm/
配置系统限制,在/etc/security/limits.conf 文件中添加如下内容:
cat >> /etc/security/limits.conf << EOF
dmdba soft nofile 4096
dmdba hard nofile 65536
EOF
验证修改:
[root@dm1 ~]# ulimit -a
配置环境变量:在dmdba用户的~/.bash_profile 里添加如下内容:
export DM_HOME="/dm/dmdbms"
export LD_LIBRARY_PATH="/dm/dmdbms/bin:$LD_LIBRARY_PATH"
export PATH="/dm/dmdbms/bin:$PATH"
注意,在DM 软件安装时会自动添加DM_HOME 和 LD_LIBRARY_PATH 变量,这里只需要添加PATH即可。
2 安装DM 数据库
复制安装文件: 将DM8的ISO上传到Linux系统,并挂载到/mnt:
将安装文件复制到/dm 目录下并修改安装文件权限:
[dave@www.cndba.cn dm]# chown dmdba:dinstall DMInstall.bin
[dave@www.cndba.cn dm]# ll
total 1135400
-rw-r--r--. 1 dmdba dinstall 583747584 Sep 25 14:18 dm8_setup_rh7_64_ent_8.1.0.147_20190328.iso
drwxr-xr-x. 2 dmdba dinstall 6 Sep 25 14:30 dmdbms
-r-xr-xr-x. 1 dmdba dinstall 578898154 Sep 25 14:19 DMInstall.bin
[dave@www.cndba.cn dm]#
用dmdba用户执行./DMInstall.bin 程序,在执行该命令时可以加上-i 选项,使用静默安装。 我们这里为了看的更直观一些,选择图形界面安装:
[dave@www.cndba.cn dm]# /dm/dmdbms/script/root/root_installer.sh
Move /dm/dmdbms/bin/dm_svc.conf to /etc
Modify the files' mode of DM Server
Create the DmAPService service
Created symlink from /etc/systemd/system/multi-user.target.wants/DmAPService.service to /usr/lib/systemd/sy
Finished to create the service (DmAPService)
Start the DmAPService service
[dave@www.cndba.cn dm]#
在安装结束的时候,会提示我们是否初始化数据库,我们这里选择不初始化,结束安装。
3 创建数据库实例
DM数据库实例创建有两种方式:
1)dminit命令:这是一种命令行的工具。
2)dbca.sh工具,在/dm/dmdbms/tool 目录下,是一种图形化的界面。
Dminit的创建参考如下博客:
DM7 达梦数据库 通过dminit 创建 并 注册 数据库实例
https://www.cndba.cn/dave/article/3580
Dbca 图形界面参考DM7的安装。
Linux 平台 达梦 DM7 单实例 安装手册 详细截图版
https://www.cndba.cn/dave/article/3565
disql登录验证一下:
[dmdba@dm8 ~]$ disql SYSDBA/SYSDBA
Server[LOCALHOST:5236]:mode is normal, state is open
login used time: 15.514(ms)
disql V8.1.0.147-Build(2019.03.27-104581)ENT
SQL> select * from v$version;
LINEID BANNER
---------- ---------------------------------------------------------------
1 DM Database Server x64 V8.1.0.147-Build(2019.03.27-104581)ENT
2 DB Version: 0x7000a
used time: 7.312(ms). Execute id is 2136.
SQL>
版权声明:本文为博主原创文章,未经博主允许不得转载。