一、安裝前環境準備
1.建立使用者
groupadd dinstall
useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba
id dmdba
uid=1000(dmdba) gid=1000(dinstall) 組=1000(dinstall)
2.作業系統資源限制檢查
ulimit -SHn 65535
vim /etc/security/limits.conf
* soft nofile 65535
* hard nofile 65535
* soft nproc 65535
* hard nproc 65535
vim /etc/sysctl.conf
fs.file-max=655360
net.ipv4.ip_forward = 1
net.ipv6.conf.all.disable_ipv6 =1
sysctl -p
關閉防火牆
systemctl stop firewalld && systemctl disable firewalld
3.上傳安裝包解壓掛載
unzip dm8_20240116_x86_rh7_64.zip
yum install -y unzip
unzip dm8_20240116_x86_rh7_64.zip
mount dm8_20240116_x86_rh7_64.iso /mnt/
4.切換到dmdba配置環境變數
su - dmdba
vim .bash_profile
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/data/dmdbms/bin"
export DM_HOME="/data/dmdbms"
source .bash_profile
二、安裝達夢資料庫
1.建立安裝目錄
mkdir -p /data/dmdbms
2.安裝
cd /mnt/
./DMInstall.bin -i
安裝目錄填寫/data/dmdbms
切換到dmdba,初始化資料庫
su - dmdba
cd /data/dmdbms/bin
./dminit PATH=/data/dmdbms/data page_size=32 case_sensitive=0 CHARSET=1 EXTENT_SIZE=32 LENGTH_IN_CHAR=1
配置開機啟動
/data/dmdbms/script/root/dm_service_installer.sh -t dmserver -p DMSERVER -dm_ini /data/dmdbms/data/DAMENG/dm.ini
systemctl status DmServiceDMSERVER
systemctl enable DmServiceDMSERVER
systemctl start DmServiceDMSERVER
netstat -ntpl|grep 5236