1 关闭防火墙
systemctl stop firewalld
systemctl disable firewalld
2 配置SELINUX
sed -i s#SELINUX=enforcing#SELINUX=disabled# /etc/selinux/config
setenforce 0
3 配置hosts
[root@dm8 ~]# hostname
dm8.dell
[root@dm8 ~]# cat /etc/hosts
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
::1 localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.88 dm8 dm8.dell
4 ulimit配置
cp /etc/security/limits.conf /etc/security/limits.conf.bak
echo "dmdba hard nofile 65536" >>/etc/security/limits.conf
echo "dmdba soft nofile 65536" >>/etc/security/limits.conf
echo "dmdba hard stack 327684" >>/etc/security/limits.conf
echo "dmdba soft stack 16384" >>/etc/security/limits.conf
5 创建用户
groupadd dinstall
useradd dmdba -g dinstall
echo "dmdba" | passwd --stdin dmdba
6 创建路径
mkdir -p /home/dmdba/dmdbms
mkdir -p /opt/dm/dmarch
mkdir -p /opt/dm/dmbak
mkdir -p /opt/dm/dmdata
7 上传dm8_20220304_x86_rh6_64.iso到/root/dm8
挂载:mount -o loop /root/dm8/dm8_20220304_x86_rh6_64.iso /mnt
拷贝:cp -r /mnt/* /home/dmdba/
8 设置路径权限
chown -R dmdba:dinstall /home/dmdba/
chown -R dmdba:dinstall /opt/dm/
chmod -R 775 /home/dmdba/
chmod -R 775 /opt/dm/
9 设置dm环境变量
echo 'export DM_HOME=/home/dmdba/dmdbms' >> /etc/profile
echo 'export PATH=$PATH:$DM_HOME/bin' >> /etc/profile
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DM_HOME/bin' >> /etc/profile
echo 'umask 022'>> /etc/profile
生效:source /etc/profile
10 安装依赖
yum -y install binutils.x86_64 compat-libcap1.x86_64 compat-libstdc++-33.x86_64 compat-libstdc++-33.i686 gcc.x86_64 gcc-c++.x86_64 glibc.i686 glibc.x86_64 glibc-devel.x86_64 glibc-devel.i686 ksh.x86_64 mksh.x86_64 libgcc.i686 libgcc.x86_64 libstdc++.x86_64 libstdc++.i686 libstdc++-devel.x86_64 libstdc++-devel.i686 libaio.x86_64 libaio.i686 libaio-devel.x86_64 libaio-devel.i686 make.x86_64 sysstat.x86_64 unixODBC.x86_64 unixODBC-devel.x86_64 elfutils-libelf.x86_64 elfutils-libelf-devel.x86_64 elfutils-libelf-devel-static.x86_64 xorg-x11-utils.x86_64 kmod kmod-libs xhost gtk2 libXtst xorg-x11-fonts-Type1 google-noto-sans-simplified-chinese-fonts.noarch google-noto-sans-traditional-chinese-fonts.noarch kde-l10n-Chinese
注:如果是内网可以通过搭建yum仓库处理依赖。
11 图形安装
切换到dmdba用户:su - dmdba
指定输出DISPLAY:export DISPLAY=192.168.1.3:0.0 注:IP是同一网段的操作机(远程服务器的电脑IP),而非服务器IP。
[dmdba@dm8 ~]$ export DISPLAY=192.168.1.3:0.0
[dmdba@dm8 ~]$ xhost +
access control disabled, clients can connect from any host
xhost: must be on local machine to enable or disable access control.
[dmdba@dm8 ~]$ cd /home/dmdba/
[dmdba@dm8 ~]$ ll
总用量 927092
drwxrwxr-x. 3 dmdba dinstall 20 9月 14 21:24 dm
-rwxrwxr-x. 1 dmdba dinstall 2802237 9月 14 21:24 DM8 Install.pdf
-rwxrwxr-x. 1 dmdba dinstall 946534466 9月 14 21:24 DMInstall.bin
[dmdba@dm8 ~]$ ./DMInstall.bin
解压安装程序…
注:正常情况下会调出如下的安装向导页面,如果没有正常调出的原因是缺依赖,重新执行第10步安装依赖即可。
点击确定
点击下一步
选择接受,点击下一步
有key的可以再这一步选择key后点击下一步,没有key的直接点下一步
默认典型安装,点击下一步
点击下一步
点击安装
进度条快完的时候提示
打开另外一个终端用root登录执行/home/dmdba/dmdbms/script/root/root_installer.sh
[root@dm8 ~]# /home/dmdba/dmdbms/script/root/root_installer.sh
移动 /home/dmdba/dmdbms/bin/dm_svc.conf 到/etc目录
修改服务器权限
创建DmAPService服务
Created symlink from /etc/systemd/system/multi-user.target.wants/DmAPService.service to /usr/lib/systemd/system/DmAPService.service.
创建服务(DmAPService)完成
启动DmAPService服务
[root@dm8 ~]#
执行完成后点击确定,提示是否关闭对话框,点击是
点击完成,接下来初始化数据库
点击初始化
点击开始
不用考虑选联机分析处理或联机事务处理,选择一般用途完全够用,除非有特殊需求。点击下一步
点击浏览选择数据库目录为/opt/dm/dmdata,数据库目录根据磁盘规划确定,通常会采用磁盘阵列来分配空间,建议存放数据/dmdata、存放归档/dmarch、存放备份dmbak。点击下一步
生产环境通常不采用默认端口,可在此页面修改端口。点击下一步
控制文件、数据文件、日志文件、初始化日志都是默认路径,点击下一步
鼠标可点住GB18030切换字符集为UTF-8,此处默认GB18030字符集,点击下一步
设置DBA密码,点击下一步
可勾选示例库,点击下一步
点击完成
用root执行:
mv /home/dmdba/dmdbms/bin/DmServiceDMSERVER.service /usr/lib/systemd/system/DmServiceDMSERVER.service
systemctl enable DmServiceDMSERVER.service
systemctl start DmServiceDMSERVER.service
[root@dm8 ~]# mv /home/dmdba/dmdbms/bin/DmServiceDMSERVER.service /usr/lib/systemd/system/DmServiceDMSERVER.service
[root@dm8 ~]# systemctl enable DmServiceDMSERVER.service
Created symlink from /etc/systemd/system/multi-user.target.wants/DmServiceDMSERVER.service to /usr/lib/systemd/system/DmServiceDMSERVER.service.
[root@dm8 ~]# systemctl start DmServiceDMSERVER.service
[root@dm8 ~]# systemctl status DmServiceDMSERVER.service
● DmServiceDMSERVER.service - DM Instance ServiceLoaded: loaded (/usr/lib/systemd/system/DmServiceDMSERVER.service; enabled; vendor preset: disabled)Active: active (running) since 三 2022-09-14 22:52:16 CST; 25s agoProcess: 47217 ExecStart=/home/dmdba/dmdbms/bin/DmServiceDMSERVER start (code=exited, status=0/SUCCESS)Main PID: 47241 (dmserver)CGroup: /system.slice/DmServiceDMSERVER.service└─47241 /home/dmdba/dmdbms/bin/dmserver path=/opt/dm/dmdata/DAMENG/dm.ini -noconsole9月 14 22:52:01 dm8.dell systemd[1]: Starting DM Instance Service...
9月 14 22:52:16 dm8.dell DmServiceDMSERVER[47217]: [39B blob data]
9月 14 22:52:16 dm8.dell systemd[1]: Started DM Instance Service.
回到图形化点击确定,提示是否关闭对话框,点击是
点击确定
用root执行:
systemctl restart DmServiceDMSERVER.service
点击确定,提示是否关闭对话框,点击是
点击完成。
用dmdba用户登录数据
cd /home/dmdba/dmdbms/bin
./disql SYSDBA/password
可按需开启归档
SELECT * FROM V$DM_ARCH_INI;
ALTER DATABASE MOUNT;
ALTER DATABASE ADD ARCHIVELOG 'DEST = /opt/dm/dmarch, TYPE = local, FILE_SIZE = 1024, SPACE_LIMIT = 2048';
ALTER DATABASE ARCHIVELOG;
ALTER DATABASE OPEN;
至此,数据库安装完成。