达梦数据库linux安装

官网下载安装包

操作系统上创建组

[root@bogon ~]# groupadd dinstall

创建用户

[root@bogon ~]#  useradd  -g dinstall -m -d /home/dmdba -s /bin/bash  dmdba

更改用户密码

[root@bogon ~]#  passwd dmdba

Changing password for user dmdba.

New password:

BAD PASSWORD: it is WAY too short

BAD PASSWORD: is too simple

Retype new password:

passwd: all authentication tokens updated successfully.

更改用户资源限制

[root@bogon ~]# vim /etc/security/limits.conf

dmdba soft core unlimited

dmdba hard core unlimited

dmdba soft nofile 65536

dmdba hard nofile 65536

dmdba soft nproc  65536

dmdba hard nproc  65536

dmdba soft stack  65536

dmdba hard stack  65536

更改用户环境变量

[root@bogon ~]# su - dmdba

[dmdba@bogon ~]$ vi .bash_profile

# .bash_profile

# Get the aliases and functions

if [ -f ~/.bashrc ]; then

        . ~/.bashrc

fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin

export PATH

export DM_HOME=/home/dmdba/dmdbms

export PATH=$PATH:$DM_HOME/bin

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DM_HOME/bin


[dmdba@bogon ~]$ source .bash_profile

上传安装包

[root@iZ8vbaqy6y31saeaqsu5qlZ ~]# cd /

[root@iZ8vbaqy6y31saeaqsu5qlZ /]# ll

-rw-r--r--   1 root root 761722880 Mar 17 14:50 dm8_20210712_x86_rh6_64_ent_8.1.2.38_pack1.iso

[root@iZ8vbaqy6y31saeaqsu5qlZ /]#

挂载安装包

[root@iZ8vbaqy6y31saeaqsu5qlZ /]# mount -oloop dm8_20210712_x86_rh6_64_ent_8.1.2.38_pack1.iso /mnt

mount: /dev/loop0 is write-protected, mounting read-only

[root@iZ8vbaqy6y31saeaqsu5qlZ /]# cd /mnt

[root@iZ8vbaqy6y31saeaqsu5qlZ mnt]# ll

total 743807

-r-xr-xr-x 1 root root   2783507 Jul 11  2021 DM8 Install.pdf

-r-xr-xr-x 1 root root 758874391 Jul 11  2021 DMInstall.bin

执行安装命令

[root@iZ8vbaqy6y31saeaqsu5qlZ mnt]# su - dmdba

Last login: Thu Mar 17 15:28:21 CST 2022 on pts/2


[dmdba@iZ8vbaqy6y31saeaqsu5qlZ ~]$ cd /mnt/

[dmdba@iZ8vbaqy6y31saeaqsu5qlZ mnt]$ ./DMInstall.bin -i

Please select the installer's language (E/e:English C/c:Chinese) [E/e]:e

Extract install files..........

core file size          (blocks, -c) 0

data seg size           (kbytes, -d) unlimited

scheduling priority             (-e) 0

file size               (blocks, -f) unlimited

pending signals                 (-i) 3880

max locked memory       (kbytes, -l) 64

max memory size         (kbytes, -m) unlimited

open files                      (-n) 65535

pipe size            (512 bytes, -p) 8

POSIX message queues     (bytes, -q) 819200

real-time priority              (-r) 0

stack size              (kbytes, -s) 8192

cpu time               (seconds, -t) unlimited

max user processes              (-u) 3880

virtual memory          (kbytes, -v) unlimited

file locks                      (-x) unlimited

The max number of open files is too little, suggest to set 65536 or more to number of open files.

Welcome to DM DBMS Installer

Whether to input the path of Key File? (Y/y:Yes N/n:No) [Y/y]:n

Whether to Set The TimeZone? (Y/y:Yes N/n:No) [Y/y]:y

TimeZone:

[21]: GTM+08=China

Please Select the TimeZone [21]:21

Installation Type:

1 Typical

2 Server

3 Client

4 Custom

Please Input the number of the Installation Type [1 Typical]:1

Require Space: 1181M

Please Input the install path [/home/dmdba/dmdbms]:

Available Space:28G

Please Confirm the install path(/home/dmdba/dmdbms)? (Y/y:Yes N/n:No) [Y/y]:y

Pre-Installation Summary

Installation Location: /home/dmdba/dmdbms

Require Space: 1181M

Available Space: 28G

Version Information:

Expire Date:

Installation Type: Typical

Confirm to Install? (Y/y:Yes N/n:No):y

2022-03-17 15:35:38

[INFO] Installing DM DBMS...

2022-03-17 15:35:39

[INFO] Installing BASE Module...

2022-03-17 15:35:50

[INFO] Installing SERVER Module...

2022-03-17 15:35:51

[INFO] Installing CLIENT Module...

2022-03-17 15:36:03

[INFO] Installing DRIVERS Module...
2022-03-17 15:36:06
[INFO] Installing MANUAL Module...
2022-03-17 15:36:07
[INFO] Installing SERVICE Module...
2022-03-17 15:36:08
[INFO] Move log file to log directory.
2022-03-17 15:36:09
[INFO] Installed DM DBMS completely.

Please execute the commands by root:

/home/dmdba/dmdbms/script/root/root_installer.sh


End

切换到root用户下执行命令

[dmdba@iZ8vbaqy6y31saeaqsu5qlZ mnt]$

[dmdba@iZ8vbaqy6y31saeaqsu5qlZ mnt]$ logout

[root@iZ8vbaqy6y31saeaqsu5qlZ mnt]# /home/dmdba/dmdbms/script/root/root_installer.sh

Move /home/dmdba/dmdbms/bin/dm_svc.conf to /etc

Modify the files' mode of DM Server

Create the DmAPService service

Created symlink from /etc/systemd/system/multi-user.target.wants/DmAPService.service to /usr/lib/systemd/system/DmAPService.service.

Finished to create the service (DmAPService)

Start the DmAPService service

进行数据库配置

[root@iZ8vbaqy6y31saeaqsu5qlZ mnt]# su - dmdba

Last login: Thu Mar 17 15:31:17 CST 2022 on pts/2

[dmdba@iZ8vbaqy6y31saeaqsu5qlZ ~]$ ls

dmdbms

[dmdba@iZ8vbaqy6y31saeaqsu5qlZ ~]$ cd dmdbms/

[dmdba@iZ8vbaqy6y31saeaqsu5qlZ dmdbms]$ ls

bin   desktop  drivers  jar  license_en.txt  log      script  uninstall     web

bin2  doc      include  jdk  license_zh.txt  samples  tool    uninstall.sh

[dmdba@iZ8vbaqy6y31saeaqsu5qlZ bin]$ pwd

/home/dmdba/dmdbms/bin

[dmdba@iZ8vbaqy6y31saeaqsu5qlZ bin]$ ./dminit path=/home/dmdba/dmdbms/dmdata page_size=32

initdb V8

db version: 0x7000c

file dm.key not found, use default license!

License will expire on 2022-07-09

Normal of FAST

Normal of DEFAULT

Normal of RECYCLE

Normal of KEEP

Normal of ROLL


 log file path: /home/dmdba/dmdbms/dmdata/DAMENG/DAMENG01.log

 log file path: /home/dmdba/dmdbms/dmdata/DAMENG/DAMENG02.log


write to dir [/home/dmdba/dmdbms/dmdata/DAMENG].

create dm database success. 2022-03-17 15:45:57

注册服务

[root@iZ8vbaqy6y31saeaqsu5qlZ root]# ./dm_service_installer.sh -t dmserver -p dmserver -dm_ini /home/dmdba/dmdbms/dmdata/DAMENG/dm.ini

Created symlink from /etc/systemd/system/multi-user.target.wants/DmServicedmserver.service to /usr/lib/systemd/system/DmServicedmserver.service.

Finished to create the service (DmServicedmserver)

启动数据库

[root@iZ8vbaqy6y31saeaqsu5qlZ root]# systemctl start DmServicedmserver

查看是否成功启动

[root@iZ8vbaqy6y31saeaqsu5qlZ ~]# ps -ef | grep dm

dmdba     7613     1  0 15:42 ?        00:00:00 /home/dmdba/dmdbms/bin/dmap

dmdba     7809     1  5 15:50 ?        00:00:03 /home/dmdba/dmdbms/bin/dmserver path=/home/dmdba/dmdbms/dmdata/DAMENG/dm.ini -noconsole

root      7877  7684  0 15:51 pts/3    00:00:00 grep --color=auto dm

[dmdba@iZ8vbaqy6y31saeaqsu5qlZ ~]$ disql SYSDBA/SYSDBA

Server[LOCALHOST:5236]:mode is normal, state is open

login used time : 1.721(ms)

disql V8

SQL> select * from v$database ;

LINEID     NAME   CREATE_TIME         ARCH_MODE LAST_CKPT_TIME      STATUS$     ROLE$     

---------- ------ ------------------- --------- ------------------- ----------- -----------

           MAX_SIZE             TOTAL_SIZE           DSC_NODES   OPEN_COUNT  STARTUP_COUNT      

           -------------------- -------------------- ----------- ----------- --------------------

           LAST_STARTUP_TIME 

           -------------------

1          DAMENG 2022-03-17 15:45:57 Y         2022-03-18 09:25:15 4           0

           0                    8224                 1           3           1

           2022-03-17 15:50:26

used time: 3.855(ms). Execute id is 53800.

达梦社区地址:https://eco.dameng.com

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值