admin 发表于 2020-1-13 23:59:41

达梦DM7数据库安装与卸载

目录

1. 文档控制    1
1.1. 修改记录    1
1.2. 文档分发    1
2. 配置安装环境    2
2.1. 系统环境检查    2
2.2. 创建组和用户    2
2.3. 检查依赖包    2
2.4. 创建目录    2
2.5. 检查资源限制    3
2.6. 上传介质    3
3. 图形安装方式    4
3.1. 执行安装程序    4
3.2. 初始化数据库    15
3.3. 查看实例    22
3.4. 配置变量    23
3.5. 连接实例确认状态    23
3.6. 关闭实例    23
3.7. 删除数据库    24
3.8. 卸载达梦软件    28
4. 命令安装方式    30
4.1. 执行安装程序    30
4.2. root注册服务    33
4.3. 配置变量    33
4.4. 初始化数据库    34
4.5. root注册服务    35
4.6. 启动实例    36
4.7. 连接实例确认状态    36


1.文档控制
1.1.修改记录
日期    作者    版本    修改记录
            
            

1.2.文档分发
拷贝No.    姓名    职务    单位
            
            
            

2.
配置安装环境
2.1.系统环境检查

2.2.创建组和用户

2.3.检查依赖包

2.4.创建目录

2.5.检查资源限制

2.6.上传介质

3.图形安装方式
3.1.执行安装程序













3.2.初始化数据库













3.3.查看实例

3.4.配置变量

3.5.连接实例确认状态

3.6.关闭实例

3.7.删除数据库







3.8.卸载达梦软件



4.命令安装方式
4.1.执行安装程序
# su - dmdba
Last login: Mon Nov 25 22:36:32 CST 2019 on pts/0
$ cd /media
$ ls
DMInstall.binDM_Install_en.pdfDM_Install_zh.pdfrelease_en.txtrelease_zh.txt
$ ./DMInstall.bin -i
Please select the installer's language (E/e:English C/c:Chinese) :
Extract install files.........
Welcome to DM DBMS Installer

Whether to input the path of Key File? (Y/y:Yes N/n:No) :
Please Input the Path of the Key File :
Please input the path of key file!
Whether to input the path of Key File? (Y/y:Yes N/n:No) :n

Whether to Set The TimeZone? (Y/y:Yes N/n:No) :
TimeZone:
[ 1]: GTM-12=West Date Line
[ 2]: GTM-11=Samoa
[ 3]: GTM-10=Hawaii
[ 4]: GTM-09=Alaska
[ 5]: GTM-08=Pacific(America and Canada)
[ 6]: GTM-07=Arizona
[ 7]: GTM-06=Central(America and Canada)
[ 8]: GTM-05=East(America and Canada)
[ 9]: GTM-04=Atlantic(America and Canada)
: GTM-03=Brasilia
: GTM-02=Middle Atlantic
: GTM-01=Azores
: GTM=Greenwich Mean Time
: GTM+01=Sarajevo
: GTM+02=Cairo
: GTM+03=Moscow
: GTM+04=AbuDhabi
: GTM+05=Islamabad
: GTM+06=Dakar
: GTM+07=BangKok,Hanoi
: GTM+08=China
: GTM+09=Seoul
: GTM+10=Guam
: GTM+11=Solomon
: GTM+12=Fiji
: GTM+13=Nukualofa
: GTM+14=Kiribati
Please Select the TimeZone :21

Installation Type:
1 Typical
2 Server
3 Client
4 Custom
Please Input the number of the Installation Type :1
Require Space: 957M

Please Input the install path :/app/dameng
Available Space:63G
Please Confirm the install path(/app/dameng)? (Y/y:Yes N/n:No) :y

Pre-Installation Summary
Installation Location: /app/dameng
Require Space: 957M
Available Space: 63G
Version Information:
Expire Date:
Installation Type: Typical
Confirm to Install? (Y/y:Yes N/n:No):y
2019-11-25 23:21:51
Installing DM DBMS...
2019-11-25 23:21:52
Installing BASE Module...
2019-11-25 23:21:53
Installing SERVER Module...
2019-11-25 23:21:53
Installing CLIENT Module...
2019-11-25 23:21:54
Installing DRIVERS Module...
2019-11-25 23:21:54
Installing MANUAL Module...
2019-11-25 23:21:54
Installing SERVICE Module...
2019-11-25 23:21:55
Move ant log file to log directory.
2019-11-25 23:21:56
Installed DM DBMS completely.

Please execute the commands by root:
/app/dameng/script/root/root_installer.sh

End
4.2.root注册服务
# cd /tmp/media
# ls
DMInstall.binDM_Install_en.pdfDM_Install_zh.pdfrelease_en.txtrelease_zh.txt
# /app/dameng/script/root/root_installer.sh
Move /app/dameng/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
4.3.配置变量
$ cat ~/.bash_profile
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
      . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH


export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/app/dameng/bin"
export DM_HOME="/app/dameng"
export PATH=/app/dameng/bin:/app/dameng/tool:$PATH
$
4.4.初始化数据库
$ dminit
initdb V7.6.0.197-Build(2019.09.12-112648)ENT
db version: 0x7000a
file dm.key not found, use default license!
License will expire on 2020-09-12
input system dir: /app/dameng/data
input db name: dameng
input port num: 5236
input page size(4, 8, 16, 32): 8
input extent size(16, 32): 16
input sec priv mode(0, 1): 0
input time zone(-12:59,+14:00): +8:00
string case sensitive? (es, o): n
which charset to use? (0, 1, 2): 1
length in char? (es, o): y
enable database encrypt? (es, o): n
page check mode? (0/1/2): 0
input elog path: /app/dameng/data/dameng
auto_overwrite mode? (0/1/2): 2

log file path: /app/dameng/data/dameng/dameng01.log


log file path: /app/dameng/data/dameng/dameng02.log

write to dir .
create dm database success. 2019-11-25 23:34:36
4.5.root注册服务
# ./dm_service_installer.sh -h
Usage: dm_service_installer.sh -t service_type [-p service_name_postfix] [-i ini_file] [-d dcr_ini_file] [-m open|mount] [-y dependent_service]
or dm_service_installer.sh [-s service_file_path]
or dm_service_installer.sh -h
   -t   Service Type, include: dmimon,dmap,dmserver,dmwatch,dmrww,dmwmon,dmwatcher,dmmonitor,dmcss,dmcssm,dmasmsvr.
   -p   Service Name Postfix, is invalid for dmimon,dmap.
   -i   The path of the ini file, is invalid for dmimon,dmap.
   -d   The path of dmdcr.ini, is valid for dmserver only, select.
   -m   Set the start modeof the server, include:open or mount, is valid for dmserver only, select.
   -y   Set the dependent service, this parameter is valid for dmserver,dmasmsvr in systemd service environment.
   -s   The path of the service script file, if set this parameter and ignore other parameter but -y.
   -h   Help
# ./dm_service_installer.sh -t dmserver -i /app/dameng/data/dameng/dm.ini -p DMSERVER
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)
4.6.启动实例
$ ps -ef | grep dmserver
dmdba    31328 264090 23:42 pts/0    00:00:00 grep --color=auto dmserver
$ ./DmServiceDMSERVER start
Starting DmServiceDMSERVER:                              [ OK ]

4.7.    连接实例确认状态

页: [1]
查看完整版本: 达梦DM7数据库安装与卸载