温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Centos7怎么安装达梦数据库

发布时间:2022-05-07 16:56:49 来源:亿速云 阅读:196 作者:iii 栏目:大数据

这篇“Centos7怎么安装达梦数据库”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“Centos7怎么安装达梦数据库”文章吧。

1 准备工作

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

[root@slave1 software]# cat /etc/redhat-release
centos linux release 7.6.1810 (core)

关闭防火墙 和 selinux:

[root@slave1 software]# systemctl stop firewalld
[root@slave1 software]# systemctl disable firewalld
[root@slave1 software]# vi /etc/selinux/config
[root@slave1 software]# cat /etc/selinux/config
# this file controls the state of selinux on the system.
# selinux= can take one of these three values:
# enforcing - selinux security policy is enforced.
# permissive - selinux prints warnings instead of enforcing.
# disabled - no selinux policy is loaded.
selinux=disabled
# selinuxtype= can take one of three values:
# targeted - targeted processes are protected,
# minimum - modification of targeted policy. only selected processes are protected.
# mls - multi level security protection.
selinuxtype=targeted

创建dm用户:

[root@slave1 software]# groupadd dinstall
[root@slave1 software]# useradd -g dinstall -m -d /home/dmdba -s /bin/bash dmdba
[root@slave1 software]# passwd dmdba
changing password for user dmdba.
new password: 
bad password: the password is shorter than 8 characters
retype new password: 
passwd: all authentication tokens updated successfully.
[root@slave1 software]#

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

[root@slave1 software]# mkdir -p /dm/dmdbms
[root@slave1 software]# mkdir -p /dm/dmarch
[root@slave1 software]# mkdir -p /dm/dmbak
[root@slave1 software]# chown -r dmdba:dinstall /dm/
[root@slave1 software]# chmod -r 775 /dm/

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

[root@slave1 software]# vim /etc/security/limits.conf
dmdba soft nofile 65536
dmdba hard nofile 65536

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

export dm_home="/dm/dmdbms"
export ld_library_path="/dm/dmdbms/bin:$ld_library_path"
export path="/dm/dmdbms/bin:$path"

注意,在dm 软件安装时会自动添加dm_home 和 ld_library_path 变量,这里只需要添加path即可。

2 安装dm 数据库

复制安装文件: 将dm的iso上传到linux系统,并挂载:

[root@slave1 software]# mount dm7开发版(rh7-64)20190917.iso /mnt/
mount: /dev/loop0 is write-protected, mounting read-only
[root@slave1 software]# cd /mnt/
[root@slave1 mnt]# ls
dminstall.bin dm_install_en.pdf dm_install_zh.pdf release_en.txt release_zh.txt

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

[root@slave1 mnt]# pwd
/mnt
[root@slave1 mnt]# cp ./dminstall.bin /dm/
[root@slave1 mnt]# cd /dm
[root@slave1 dm]# ll
total 573076
drwxrwxr-x 2 dmdba dinstall 6 dec 9 23:08 dmarch
drwxrwxr-x 2 dmdba dinstall 6 dec 9 23:08 dmbak
drwxrwxr-x 2 dmdba dinstall 6 dec 9 23:08 dmdbms
-r-xr-xr-x 1 root root 586828259 dec 9 23:14 dminstall.bin
[root@slave1 dm]# chown dmdba:dinstall dminstall.bin
[root@slave1 dm]# ll
total 573076
drwxrwxr-x 2 dmdba dinstall 6 dec 9 23:08 dmarch
drwxrwxr-x 2 dmdba dinstall 6 dec 9 23:08 dmbak
drwxrwxr-x 2 dmdba dinstall 6 dec 9 23:08 dmdbms
-r-xr-xr-x 1 dmdba dinstall 586828259 dec 9 23:14 dminstall.bin

用dmdba用户执行./dminstall.bin -i 程序,开始安装:

[root@slave1 dm]$ pwd
/dm
[root@slave1 dm]$ ./dminstall.bin -i
please select the installer's language (e/e:english c/c:chinese) [e/e]:c

解压安装程序.........

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals  (-i) 3756
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files  (-n) 1024
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) 3756
virtual memory (kbytes, -v) unlimited
file locks  (-x) unlimited

可打开文件数过少,建议至少设置为65536或更多。

欢迎使用达梦数据库安装程序 

是否输入key文件路径? (y/y:是 n/n:否) [y/y]:n

是否设置时区? (y/y:是 n/n:否) [y/y]:y

设置时区:

[ 1]: gtm-12=日界线西
[ 2]: gtm-11=萨摩亚群岛
[ 3]: gtm-10=夏威夷
[ 4]: gtm-09=阿拉斯加
[ 5]: gtm-08=太平洋时间(美国和加拿大)
[ 6]: gtm-07=亚利桑那
[ 7]: gtm-06=中部时间(美国和加拿大)
[ 8]: gtm-05=东部部时间(美国和加拿大)
[ 9]: gtm-04=大西洋时间(美国和加拿大)
[10]: gtm-03=巴西利亚
[11]: gtm-02=中大西洋
[12]: gtm-01=亚速尔群岛
[13]: gtm=格林威治标准时间
[14]: gtm+01=萨拉热窝
[15]: gtm+02=开罗
[16]: gtm+03=莫斯科
[17]: gtm+04=阿布扎比
[18]: gtm+05=伊斯兰堡
[19]: gtm+06=达卡
[20]: gtm+07=曼谷,河内
[21]: gtm+08=中国标准时间
[22]: gtm+09=汉城
[23]: gtm+10=关岛
[24]: gtm+11=所罗门群岛
[25]: gtm+12=斐济
[26]: gtm+13=努库阿勒法
[27]: gtm+14=基里巴斯

请选择设置时区 [21]:21

安装类型:

1 典型安装
2 服务器
3 客户端
4 自定义

请选择安装类型的数字序号 [1 典型安装]:1

所需空间: 963m

请选择安装目录 [/opt/dmdbms]:/dm/dmdbms

可用空间: 8g

是否确认安装路径(/dm/dmdbms)? (y/y:是 n/n:否)  [y/y]:y

安装前小结

安装位置: /dm/dmdbms
所需空间: 963m
可用空间: 8g
版本信息:
有效日期:
安装类型: 典型安装
是否确认安装? (y/y:是 n/n:否):y
2019-12-09 23:17:21
[info] 安装达梦数据库...
2019-12-09 23:17:22
[info] 安装 基础 模块...
2019-12-09 23:17:32
[info] 安装 服务器 模块...
2019-12-09 23:17:33
[info] 安装 客户端 模块...
2019-12-09 23:17:44
[info] 安装 驱动 模块...
2019-12-09 23:17:55
[info] 安装 手册 模块...
2019-12-09 23:17:55
[info] 安装 服务 模块...
2019-12-09 23:17:59
[info] 移动ant日志文件。
2019-12-09 23:17:59
[info] 更改安装目录权限完成。
2019-12-09 23:17:59
[info] 正在启动dmapservice服务...
2019-12-09 23:18:01
[info] 启动dmapservice服务成功。
2019-12-09 23:18:01
[info] 安装达梦数据库完成。 

安装结束

3 创建数据库实例

[root@slave1 bin]$ pwd
/dm/dmdbms/bin
[root@slave1 bin]$ ./dminit path=/dm/dmdbms/data db_name=dmdba instance_name=dmdba ctl_path=/dm/dmdbms/data/dmdba/dm.ctl case_sensitive=n charset=1
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
 
 log file path: /dm/dmdbms/data/dmdba/dmdba01.log
 
 
 log file path: /dm/dmdbms/data/dmdba/dmdba02.log
 
write to dir [/dm/dmdbms/data/dmdba].
create dm database success. 2019-12-09 23:25:17

4 注册数据库服务

注册的shell 脚本dm_service_installer.sh在dm_home/script/root目录下,执行注册时需要使用root用户执行。

[root@slave1 bin]# cd /dm/dmdbms/script/root
[root@slave1 root]# ./dm_service_installer.sh -t dmserver -i /dm/dmdbms/data/dmdba/dm.ini -p dmdba
created symlink from /etc/systemd/system/multi-user.target.wants/dmservicedmdba.service to /usr/lib/systemd/system/dmservicedmdba.service.

创建服务(dmservicedmdba)完成

5 启动数据库

[root@slave1 root]# systemctl enable dmservicedmdba.service
[root@slave1 root]# systemctl start dmservicedmdba

6 客户端连接

出现如下画面,说明安装成功,可以正常使用了。

Centos7怎么安装达梦数据库

以上就是关于“Centos7怎么安装达梦数据库”这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注亿速云行业资讯频道。

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI