原 命令行模式安装DM8达梦数据库
- 达梦数据库在Linux、Windows和Docker环境下的安装与卸载:https://www.dbaup.com/damengshujukuzailinuxwindowshedockerhuanjingxiadeanzhuangyuxiezai.html
- 软件下载:https://www.dameng.com/list_103.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 | docker rm -f lhrdm8 docker run -d --name lhrdm8 -h lhrdm8 \ -p 52360:5236 -p 52361:3389 \ -v /sys/fs/cgroup:/sys/fs/cgroup \ --privileged=true lhrbest/lhrcentos76:8.2 \ /usr/sbin/init docker cp dm8_20210712_x86_rh6_64_ent.zip lhrdm8:/soft/ docker exec -it lhrdm8 bash #close selinux sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config setenforce 0 #close firewalld systemctl stop firewalld && systemctl disable firewalld -- 创建用户和组 groupadd dinstall useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba echo "lhr" | passwd dmdba --stdin -- 配置环境变量 cat >> /root/.bashrc <<"EOF" export DM_HOME=/dm8 export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DM_HOME/bin alias disql='rlwrap disql' alias dmrman='rlwrap dmrman' EOF cat >> /home/dmdba/.bash_profile <<"EOF" export DM_HOME=/dm8 export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DM_HOME/bin alias disql='rlwrap disql' alias dmrman='rlwrap dmrman' EOF source /root/.bashrc source /home/dmdba/.bash_profile -- 修改文件打开最大数 echo 'dmdba hard nofile 65536 dmdba soft nofile 65536 dmdba hard stack 32768 dmdba soft stack 16384 ' >> /etc/security/limits.conf -- 安装目录 mkdir /dm8 chown dmdba:dinstall -R /dm8/ chmod -R 755 /dm8 -- 挂载镜像 cd /soft/ unzip dm8_20210712_x86_rh6_64_ent.zip mount -o loop /soft/dm8_20210712_x86_rh6_64_ent/dm8_20210712_x86_rh6_64_ent_8.1.2.38_pack1.iso /mnt -- 安装软件 su - dmdba /mnt/DMInstall.bin -i su - root /dm8/script/root/root_installer.sh -- 配置实例 su - dmdba dminit path=/dm8/data CHARSET=1 DB_NAME=DMLHRDB INSTANCE_NAME=DMLHRDB PORT_NUM=5236 -- 注册为系统服务(root用户) /dm8/script/root/dm_service_installer.sh -t dmserver -p DMLHRDB -dm_ini /dm8/data/DMLHRDB/dm.ini systemctl start DmServiceDMSERVER systemctl status DmServiceDMSERVER -- 查询过期时间 disql SYSDBA/SYSDBA select EXPIRED_DATE from v$license; |