文件路径放在 /works/tools/dm8_20230511_x86_rh6_64.iso
执行mount命令
- mkdir /mntdm8
-
- mount -t iso9660 /works/tools/dm8_20230511_x86_rh6_64.iso /mntdm8
-
- cd /mntdm8
- groupadd dinstall
-
- useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba
-
- passwd dmdba
- mkdir /works/apps/dm
- mkdir /works/apps/dm/dmdbms # 应用程序文件夹
- mkdir /works/apps/dm/dmarch # 归档文件夹
- mkdir /works/apps/dm/dmbak # 备份文件
- mkdir /works/apps/dm/data # 数据库文件夹
- chown -R dmdba:dinstall /works/apps/dm/
- chmod -R 775 /works/apps/dm/
-
vim /etc/security/limits.conf
内容如下
- dmdba hard nofile 65536
- dmdba soft nofile 65536
- dmdba hard stack 32768
- dmdba soft stack 16384
执行命令马上生效
sysctl -p
切换 dmdba 用户
su - dmdba
编辑环境变量
vim ~/.bashrc
在文件最后加入
- export DM_HOME="/works/apps/dmdbms"
- export LD_LIBRARY_PATH="/works/apps/dmdbms/bin:$LD_LIBRARY_PATH"
- export PATH="/works/apps/dmdbms/bin:$PATH"
执行安装命令
注意,要以 dmdba 用户执行安装
- su - dmdba
-
- cd /mntdm8
-
- ./DMInstall.bin -i
返回 root 用户,执行如下代码
- exit
-
- /home/dmdba/dmdbms/script/root/root_installer.sh
- su - dmdba
- cd $DM_HOME/bin
-
- ./dminit path=/works/apps/dm/data/ DB_NAME=dbtest1 INSTANCE_NAME=dbtest1 PORT_NUM=5236 CASE_SENSITIVE=0 CHARSET=1
这句话创建了实例 dbtest1 , 数据库名也是 dbtest1 ,端口是 5236
返回root权限
exit
创建服务
/home/dmdba/dmdbms/script/root/dm_service_installer.sh -t dmserver -dm_ini /works/apps/dm/data/dbtest1/dm.ini -p dmtest1
创建了一个服务 DmServicedmtest1 ,启动该服务
systemctl start DmServicedmtest1
删除服务,注意删除前一定要先停止服务
/home/dmdba/dmdbms/script/root/dm_service_uninstaller.sh -n DmServicedmtest1
删除实例的数据空间,也就是data下的文件夹直接删除
rm -rf /works/apps/dm/data/dbtest1
创建表空间
CREATE TABLESPACE tstest1 DATAFILE 'tstest1.DBF' SIZE 50 cache=normal;
创建用户
- create user test1 identified by "test1@123" default tablespace tstest1 default index tablespace tstest1;
-
- grant "RESOURCE","PUBLIC","DBA","VTI" to test1;
-
- commit;