达梦8以配置文件静默安装

1 准备工作

安装好Linux操作系统,这里选择的是Linux 7:

达梦8以配置文件静默安装_第1张图片

关闭防火墙 和 Selinux:

systemctl status firewalld
systemctl stop firewalld
systemctl disable firewalld
sed -i 's/=enforcing/=disabled/g'  /etc/selinux/config
setenforce 0
getenforce

修改/etc/hosts 文件:

[root@dm1 ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.31.166  dm1
[root@dm1 ~]# 


hostnamectl set-hostname

创建DM用户:

groupadd dinstall
useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba
passwd dmdba

创建目录:存储dm数据库文件的空间需要提前规划并挂载好,我这里放在/dm目录下:

mkdir -p /dm/dmdbms
mkdir -p /dm/dmarch
mkdir -p /dm/dmbak
chown -R dmdba:dinstall /dm/
chmod -R 775 /dm/

配置系统限制,在/etc/security/limits.conf 文件中添加如下内容:

 cat >> /etc/security/limits.conf << EOF   
dmdba  soft  nofile  4096
dmdba  hard  nofile  65536
EOF
ulimit -a

配置环境变量:在dmdba用户的~/.bash_profile 里添加如下内容:

cat >>/home/dmdba/.bash_profile<

2 安装DM 数据库

复制安装文件: 将DM的ISO上传到Linux系统,并挂载:


mount -t auto /dev/cdrom  /mnt
[root@dm1 dm]# mount -o loop dm8_setup_rh7_64_ent_8.1.1.45_20191121.iso  /mnt
mount: /dev/loop0 is write-protected, mounting read-only

将安装文件复制到/dm 目录下并修改安装文件权限:

[root@dm1 mnt]# cp DMInstall.bin  /dm/.
[root@dm1 dm]# chown -R dmdba:dinstall /dm

准备配置文件 



en
+08:00
0
/dm/dmdbms
Y

/dm/dmdbms/data
DAMENG
DMSERVER
5236

/dm/dmdbms/data/DAMENG/dm.ctl


/dm/dmdbms/data/DAMENG/DAMENG01.log
/dm/dmdbms/data/DAMENG/DAMENG02.log

16
8
512
Y
0
0
1




+08:00
0







N

0



0

N
Y


安装数据库 

[root@dm1 mnt]# ./DMInstall.bin  -q /dm/dminstall.xml 
Extract install files..........
2020-04-29 07:26:06 
[INFO] Installing DM DBMS...
2020-04-29 07:26:07 
[INFO] Installing BASE Module...
2020-04-29 07:26:09 
[INFO] Installing SERVER Module...
2020-04-29 07:26:10 
[INFO] Installing CLIENT Module...
2020-04-29 07:26:13 
[INFO] Installing DRIVERS Module...
2020-04-29 07:26:14 
[INFO] Installing MANUAL Module...
2020-04-29 07:26:14 
[INFO] Installing SERVICE Module...
2020-04-29 07:26:17 
[INFO] Move ant log file to log directory.
2020-04-29 07:26:17 
[INFO] Change the power of installtion directory successfully.
2020-04-29 07:26:17 
[INFO] Starting DmAPService service...
2020-04-29 07:26:18 
[INFO] Start DmAPService service successfully.
2020-04-29 07:26:18 
[INFO] Installed DM DBMS completely.
2020-04-29 07:26:21 
[INFO] Creating database...
2020-04-29 07:26:24 
[INFO] Create database completed.
2020-04-29 07:26:24 
[INFO] Creating database service...
2020-04-29 07:26:24 
[INFO] Create database service completed.
2020-04-29 07:26:24 
[INFO] Starting the database service(DmServiceDMSERVER)...
2020-04-29 07:26:39 
[INFO] Start the database service(DmServiceDMSERVER) success!









[dmdba@dm1 ~]$ disql SYSDBA/SYSDBA@dm1:5236

Server[dm1:5236]:mode is normal, state is open
login used time: 3.849(ms)
disql V8
SQL> select * from v$version;

LINEID     BANNER                   
---------- -------------------------
1          DM Database Server 64 V8 
2          DB Version: 0x7000a

used time: 2.668(ms). Execute id is 989.
SQL> desc v$database;

LINEID     NAME           TYPE$        NULLABLE
---------- -------------- ------------ --------
1          NAME           VARCHAR(128) Y
2          CREATE_TIME    DATETIME(0)  Y
3          ARCH_MODE      CHAR(1)      Y
4          LAST_CKPT_TIME DATETIME(0)  Y
5          STATUS$        TINYINT      Y
6          ROLE$          TINYINT      Y
7          MAX_SIZE       BIGINT       Y
8          TOTAL_SIZE     BIGINT       Y
9          DSC_NODES      INTEGER      Y
10         OPEN_COUNT     INTEGER      Y
11         STARTUP_COUNT  BIGINT       Y

LINEID     NAME              TYPE$       NULLABLE
---------- ----------------- ----------- --------
12         LAST_STARTUP_TIME DATETIME(0) Y

12 rows got

used time: 7.708(ms). Execute id is 990.
SQL> select name from v$database;

LINEID     NAME  
---------- ------
1          DAMENG

used time: 1.471(ms). Execute id is 991.
SQL> 

至此DM8数据安装完成

你可能感兴趣的:(DM)