安装好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
SELINUXTYPE=targeted
修改/etc/hosts 文件:
[root@monitor ~]# cat /etc/hosts
127.0.0.1 localhost
192.168.56.103 dmmonitor
192.168.56.101 dm2
192.168.56.100 dm1
[root@monitor ~]#
创建DM用户:
[root@dm1 ~]# groupadd dinstall
[root@dm1 ~]# useradd -g dinstall -m -d /home/dmdba -s /bin/bash 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 文件中添加如下内容:
cat >> /etc/security/limits.conf << EOF
dmdba soft nofile 4096
dmdba hard nofile 65536
EOF
验证修改:
[root@dm1 ~]# ulimit -a
配置环境变量:在dmdba用户的~/.bash_profile 里添加如下内容:
[dm7@monitor ~]$ cat ~/.bash_profile
[root@dm1 ~]# .bash_profile
[root@dm1 ~]# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
[root@dm1 ~]# User specific environment and startup programs
PATH= P A T H : PATH: PATH:HOME/bin
export PATH
export DM_HOME="/dm7/dmdbms"
export LD_LIBRARY_PATH="/dm7/dmdbms/bin:
L
D
L
I
B
R
A
R
Y
P
A
T
H
"
e
x
p
o
r
t
P
A
T
H
=
"
/
d
m
7
/
d
m
d
b
m
s
/
b
i
n
:
LD_LIBRARY_PATH" export PATH="/dm7/dmdbms/bin:
LDLIBRARYPATH"exportPATH="/dm7/dmdbms/bin:PATH"
[dm7@monitor ~]$