DM8 安装
1、安装前准备
1.1 安装好系统
[root@study ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
cat /ect/issue # 不用
1.2 关闭防火墙和Selinux
[root@study ~]# service iptables status # 此命令再centos7 已经修改,故需要修改
Redirecting to /bin/systemctl status iptables.service
Unit iptables.service could not be found.
# 视频教程里面说错了,防火墙是开的,需要下面两步
[root@study ~]# systemctl stop firewalld.service # 关闭防火墙
[root@study ~]# systemctl disable firewalld.service # 永久关闭防火墙
[root@study ~]# vim /etc/selinux/config # 此配置无需修改
[root@study ~]# cat /etc/security/limits.conf # 需要修改,原来都是注释
1.3 配置系统限制
# 修改方法
[root@study ~]# vim /etc/security/limits.conf # 添加下面两行
dmdba soft nofile 4096
dmdba hard nofile 65535
1.4 创建DM用户
[root@study ~]# groupadd dinstall # 添加用户组
[root@study ~]# useradd -g dinstall dmdba # 在用户组里面加用户 dmdba
[root@study ~]# passwd dmdba # 给 dmdba 添加密码
1.5 创建目录:
[root@study /]# mkdir -p /dm # 新建文件
[root@study /]# chown -R dmdba:dinstall /dm/ # 修改所属,下图一
[root@study /]# chmod -R 775 /dm/ # 修改权限,下图二
2、安装DB软件
2.1 准备好安装包
# 将官网下载的.zip 文件解压到 /dm/ 目录下
[root@study ~]# cd /dm/
dm8_20220927_x86_rh6_64_ent_8.1.2.138_pack3.iso dm8_20220927_x86_rh6_64_ent.zip
dm8_20220927_x86_rh6_64_ent_8.1.2.138_pack3.iso_SHA256.txt
# 新建 /dm/iso 文件夹
[root@study dm]# mkdir iso
# 挂在镜像
[root@study dm]# mount /dm/dm8_20220927_x86_rh6_64_ent_8.1.2.138_pack3.iso /dm/iso/
mount: /dev/loop0 写保护,将以只读方式挂载
[root@study dm]# cd iso/
[root@study iso]# ls
DM8 Install.pdf DMInstall.bin
# 将安装文件拷贝到 /dm/
[root@study iso]# cp DMInstall.bin /dm/
# 修改权限
[root@study dm]# chown dmdba:dinstall DMInstall.bin
[root@study dm]# ll
总用量 2851414
-r-xr-xr-x 1 dmdba dinstall 975210514 10月 4 08:20 DMInstall.bin
dr-xr-xr-x 1 root root 2048 9月 27 16:43 iso
2.2 图形界面安装
# 使用dmdba账户登录
# 在 /dm/ 下运行命令
[dmdba@study dm]$ ./DMInstall.bin
没有key,有连接数限制,1年时间限制
修改路径到 /dm/dmdbms
出现如下窗口
打开终端运行 上述命令
dm_svc.conf # 端口号,服务等配置文件
DmapService # 非常重要的辅助服务,涉及备份恢复等。
出现如下窗口,代表安装成功
先不初始化 数据库实例,至此,DM8数据库安装完成。
3、添加环境变量
# root 用户进入 dmdba 用户的目录下,配置对应的环境变量。
# DM_HOME 变量和动态链接库文件的加载路径在程序安装成功后会自动导入。增加如下配置即可:
export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool
# 修改
cd /home/dmdba
vim .bash_profile
# 生效
su - dmdba
source .bash_profile