Linux 平台 达梦 DM7 单实例 安装手册 详细截图版
程序员文章站
2022-06-16 20:25:26
...
Linux 平台 达梦 DM7 单实例 安装手册 详细截图版
本文链接:https://www.cndba.cn/dave/article/3565
1 准备工作
安装好Linux操作系统,这里选择的是Linux 7:
[aaa@qq.com ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
关闭防火墙 和 Selinux:
[aaa@qq.com ~]# systemctl stop firewalld
[aaa@qq.com ~]# systemctl disable firewalld
[aaa@qq.com ~]# vi /etc/selinux/config
[aaa@qq.com ~]# 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 文件:
[aaa@qq.com ~]# cat /etc/hosts
127.0.0.1 localhost
192.168.20.191 dm1
192.168.20.192 dm2
创建DM用户:
[aaa@qq.com ~]# groupadd dinstall
[aaa@qq.com ~]# useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba
[aaa@qq.com ~]# 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.
[aaa@qq.com ~]#
创建目录:存储dm数据库文件的空间需要提前规划并挂载好,我这里放在/dm目录下:
[aaa@qq.com ~]# mkdir -p /dm/dmdbms
[aaa@qq.comww.cndba.cn ~]# mkdir -p /dm/dmarch
[aaa@qq.com ~]# mkdir -p /dm/dmbak
[aaa@qq.com ~]# chown -R dmdba:dinstall /dm/
[aaa@qq.com ~]# chmod -R 775 /dm/
配置系统限制,在/etc/security/limits.conf 文件中添加如下内容:
cat >> /etc/security/limits.conf << EOF
dmdba soft nofile 4096
dmdba hard nofile 65536
EOF
验证修改:
[aaa@qq.com ~]# 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 数据库
复制安装文件: 将DM的ISO上传到Linux系统,并挂载:
[aaa@qq.com ~]# mount dm7_setup_centos7_64_ent_7.6.0.145_20190325.iso /mnt
[aaa@qq.com /]# cd /mnt
[aaa@qq.com mnt]# ls
DMInstall.bin DM_Install_en.pdf DM_Install_zh.pdf release_en.txt release_zh.txt
将安装文件复制到/dm 目录下并修改安装文件权限:
[aaa@qq.com mnt]# cp DMInstall.bin /dm/
[aaa@qq.com mnt]# cd /dm
[aaa@qq.com dm]# ll
total 522052
drwxrwxr-x. 2 dmdba dinstall 6 Feb 22 22:46 dmarch
drwxrwxr-x. 2 dmdba dinstall 6 Feb 22 22:46 dmbak
drwxrwxr-x. 2 dmdba dinstall 6 Feb 22 22:46 dmdata
drwxrwxr-x. 2 dmdba dinstall 6 Feb 22 22:46 dmdbms
-r-xr-xr-x. 1 root root 534580108 Feb 22 23:06 DMInstall.bin
[aaa@qq.com dm]# chown dmdba:dinstall DMInstall.bin
[aaa@qq.com dm]# ll
total 522052
drwxrwxr-x. 2 dmdba dinstall 6 Feb 22 22:46 dmarch
drwxrwxr-x. 2 dmdba dinstall 6 Feb 22 22:46 dmbak
drwxrwxr-x. 2 dmdba dinstall 6 Feb 22 22:46 dmdata
drwxrwxr-x. 2 dmdba dinstall 6 Feb 22 22:46 dmdbms
-r-xr-xr-x. 1 dmdba dinstall 534580108 Feb 22 23:06 DMInstall.bin
[aaa@qq.com dm]#
用dmdba用户执行./DMInstall.bin 程序,开始图形安装:
[aaa@qq.com ~]# /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/system/DmAPService.service.
Finished to create the service (DmAPService)
Start the DmAPService service
[aaa@qq.com ~]#
在安装结束的时候,会提示我们是否初始化数据库,我们这里选择不初始化,结束安装。
3 创建数据库实例
在上一步我们安装了DM的数据库软件,这里我们单独创建数据库实例,DM数据库创建实例有两种方式
1)dminit命令:这是一种命令行的工具。
2)dbca.sh工具,在/dm/dmdbms/tool 目录下,是一种图形化的界面。 我们这里选择图形化的方式创建。
[aaa@qq.com ~]# mv /dm/dmdbms/bin/DmServicedave.service /usr/lib/systemd/system/DmServicedave.service
[aaa@qq.com ~]# systemctl enable DmServicedave.service
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServicedave.service to /usr/lib/systemd/system/DmServicedave.service.
[aaa@qq.com ~]# systemctl start DmServicedave.service
[aaa@qq.com ~]#
数据库实例创建完成,使用disql登录验证一下:
[aaa@qq.com ~]$ disql SYSDBA/aaa@qq.com:5236
Server[dm1:5236]:mode is normal, state is open
login used time: 9.988(ms)
disql V7.6.0.145-Build(2019.03.20-104220)ENT
SQL> select * from v$version;
LINEID BANNER
---------- ---------------------------------------------------------------
1 DM Database Server x64 V7.6.0.145-Build(2019.03.20-104220)ENT
2 DB Version: 0x7000a
used time: 7.566(ms). Execute id is 2107.
SQL>
至此,Linux 平台的DM 7 安装完成。 后续我们在继续其他操作。
上一篇: 翻页有关问题
下一篇: Python中的类与实例对象