达梦数据库准备工作

  • 时间:
  • 来源:互联网

安装好Linux操作系统:
[root@monitor ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.10 (Santiago)
[root@monitor ~]#

关闭防火墙 和 Selinux:
[root@monitor ~]# service iptables stop
[root@monitor ~]# chkconfig iptables off

[root@monitor ~]# 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 these two values:

targeted - Targeted processes are protected,

mls - Multi Level Security protection.

SELINUXTYPE=targeted

创建DM用户:
[root@dm1 ~]# groupadd dinstall
[root@dm1 ~]# useradd -g dinstall dmdba
[root@dm1 ~]# 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@dm1 ~]#

[root@monitor ~]# id dm7
uid=500(dm7) gid=500(dinstall) groups=500(dinstall)
[root@monitor ~]#

创建目录:
[root@dm1 ~]# mkdir -p /dm/dmdbms
[root@dm1 ~]# mkdir -p /dm/dmarch
[root@dm1 ~]# mkdir -p /dm/dmbak
[root@dm1 ~]# chown -R dmdba:dinstall /dm/
[root@dm1 ~]# chmod -R 775 /dm/

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

sysctl -p
验证修改:
[root@dm1 ~]# ulimit -a

配置环境变量:在dmdba用户的~/.bash_profile 里添加如下内容:
[dm7@monitor ~]$ cat ~/.bash_profile

.bash_profile

Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

User specific environment and startup programs

PATH=PATH:PATH:HOME/bin

export PATH

export DM_HOME="/dm7/dmdbms"
export LD_LIBRARY_PATH="/dm7/dmdbms/bin:LDLIBRARYPATH"exportPATH="/dm7/dmdbms/bin:LD_LIBRARY_PATH" export PATH="/dm7/dmdbms/bin:PATH"
[dm7@monitor ~]$

注意,在DM 软件安装时会自动添加DM_HOME 和 LD_LIBRARY_PATH 变量,这里只需要添加PATH即可。

yolandaxuan
发布了1 篇原创文章 · 获赞 0 · 访问量 2
私信 关注

本文链接http://element-ui.cn/news/show-1272.aspx