1. 准備工作
1.1關閉firewalld防火牆和Selinux
#查看firwalld的狀態 systemctl status firewalld #停止firewalld systemctl stop firewalld #禁用firewalld systemctl disable firewalld
#查看Selinux狀態 getenforce #關閉Selinux vim /etc/selinux/config SELINUX=disabled
1.2重啟服務器、立即生效配置
reboot
2. 安裝操作
2.1拷貝安裝包iso到服務器&掛載
拷貝iso文件到/opt/soft/DM7:
cd /opt/soft/DM7 mount dm7開發版(rh7-64)20190917.iso /mnt/
2.2創建DM安裝用戶和安裝用戶組並初始化用戶密碼
groupadd dinstall useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba passwd dmdba
2.3創建目錄
規划好存儲dm數據庫文件的目錄,這里放在/opt/dm/目錄下
mkdir -p /opt/dm/dmdbms mkdir -p /opt/dm/dmarch mkdir -p /opt/dm/dmbak chown -R dmdba:dinstall /opt/dm/ chmod -R 775 /opt/dm/
2.4配置環境變量
echo export PATH=$PATH:/opt/dm/dmdbms/bin >> /etc/profile source /etc/profile
2.5拷貝安裝文件
cp -r /mnt/* /opt/dm/ cd /opt/dm/
# DMInstall.bin 文件就是DM的安裝程序。在運行安裝程序前,需要賦予DMInstall.bin文件執行權限
chmod 755 ./DMInstall.bin
2.6命令行安裝
cd /opt/dm/
./DMInstall.bin -i
1)Please select the installer's language (E/e:English C/c:Chinese) [E/e]: 選擇語言,默認使用英語安裝,直接回車 2)Whether to input the path of Key File? (Y/y:Yes N/n:No) [Y/y]:N 驗證Key文件:用戶可以選擇是否輸入 Key 文件路徑,這里選擇N。 3)Whether to Set The TimeZone? (Y/y:Yes N/n:No) [Y/y]:y Please Select the TimeZone [21]:21 選擇21([21]: GTM+08=China) 4)Please Input the number of the Installation Type [1 Typical]:1 5)Please Input the install path [/opt/dmdbms]:/opt/dm/dmdbms 6)Please Confirm the install path(/opt/dm/dmdbms)? (Y/y:Yes N/n:No) [Y/y]:y 7)Pre-Installation Summary Installation Location: /opt/dm/dmdbms Require Space: 963M Available Space: 88G Version Information: Expire Date: Installation Type: Typical Confirm to Install? (Y/y:Yes N/n:No):y 8)等待安裝完畢。
9) 創建DM數據庫實例
#查看幫助 cd /opt/dm/dmdbms/bin/ ./dminit help #帶參數的方式執行dminit ./dminit PATH=/opt/dm/dmdbms/data DB_NAME=testdb INSTANCE_NAME=dmsrv
10)注冊數據庫服務 [root@ root]# ./dm_service_installer.sh -t dmserver -i /opt/dm/dmdbms/data/testdb/dm.ini -p dmsrv
11)測試注冊是否成功 service DmServicedmsrv start 12)#查看端口監聽狀態(dminit初始化時默認PORT_NUM=5236) netstat -an |grep 5236 13)#查看進程 [root@localhost bin]# ps aux|grep dmserver
14)#數據庫實例創建完成,使用disql登錄驗證一下(#如果沒有單獨設置或修改過的話,默認SYSDBA用戶密碼相同。) [root@localhost bin]# disql SYSDBA/SYSDBA
至此,達夢數據庫部署成功!