1-达梦数据库DM8的安装
一、环境:在服务器或者vmware上搭建好linux (图形化界面)
二、DM8的安装
2.1查看系统版本
[root@study ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 8.2 (Ootpa)
2.2在达梦官网找到对应linux版本安装包还有Windows环境下的达梦8的安装包
2.3 关闭selinux和防火墙
[root@study ~]# cat /etc/sysconfig/selinux
# 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=disable
# SELINUXTYPE= can take one of three values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
2.4设置系统限制
[root@study /]# cat /etc/security/limits.conf |grep -v "^#"
dmdba soft nofile 65536
dmdba hard nofile 65536
2.5 创建DM用户
[root@study ~]# groupadd dinstall
[root@study ~]# useradd -g dinstall dmdba
[root@study ~]# passwd dmdba
2.6创建目录
[root@study ~]# mkdir -p /dm
[root@study ~]# chown -R dmdba:dinstall /dm/
[root@study ~]# chmod 775 /dm/
2.7 将达梦官网下载的iso文件上传到linux环境中
我的是Windows传到linux虚拟机中
在cmd中
scp E:\study\达梦\安装包\dm8_20240116_x86_rh7_64\dm8_20240116_x86_rh7_64.iso root@linux的ip地址:/dm
[root@study ~]# cd /dm
[root@study dm]# ls
dm8_20240116_x86_rh7_64.iso
[root@study dm]# mkdir iso
[root@study dm]# mount /dm/dm8_20240116_x86_rh7_64.iso /dm/iso/
mount: /dev/loop0 写保护,将以只读方式挂载
[root@study dm]# cd /dm/iso/
[root@study iso]# ls
DM8 Install.pdf DMInstall.bin
[root@study iso]# cp DMInstall.bin /dm/
2.8修改权限
[root@study dm]# chown dmdba:dinstall DMInstall.bin
2.9图形化界面安装
用root执行
[root@study ~]#xhost +
[root@study ~]#echo $DISPLAY
用dmdba用户执行
[dmdba@study dm]# export DISPLAY=:0.0
[dmdba@study dm]# xhost +
[dmdba@study dm]#./DMInstall.bin
命令行方式安装
[dmdba@study dm]#./DMInstall.bin -i
2.10 配置环境变量
[dmdba@study ~]$ cat ~/.bash_profile
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/dm/dmdbms/bin"
export DM_HOME="/dm/dmdbms"
export PATH=$PATH:$HOME/bin:$DM_HOME/bin
[dmdba@study ~]$ source ~/.bash_profile
2.11 测试
[dmdba@study ~]$ disql
disql V8
用户名: //安装成功