数据库
首页 > 数据库> > dm 数据库安装和维护

dm 数据库安装和维护

作者:互联网

###sample 1 静默安装

#!/bin/bash
cd /opt/
wget http://10.0.0.200/dm8/dm8_20210617_x86_rh6_64_sec_8.1.2.18_pack3.iso .
wget http://10.0.0.200/dm8/db_template.xml .

filename=$1
if [ -f ${filename} ]
then
mount -o loop /opt/dm8*.iso /mnt
echo -------iso挂载到/mnt完成--------
rm -rf /opt/dm8*
echo -------删除达梦iso文件----------
else
echo "请出入正确的文件名"

fi

echo ----"创建达梦数据库的用户跟组"-------

mkdir /opt/
mkdir /dmdata
mkdir /opt/dmdbms/
mkdir /dmdata/data
groupadd dinstall
useradd -g dinstall dmdba
chown -R dmdba:dinstall /dmdata
chown -R dmdba:dinstall /dmdata/data
chown -R dmdba:dinstall /opt/dmdbms
echo ----"创建达梦数用户和组完成"---------
cat /opt/dm_template.xml

echo " "
echo "make sure path and config is right ,the install will begin 30 seconds later"
echo " "
sleep 30

chmod 755 /opt/db_template.xml
#su - dmdba -c "/mnt/DMI* -q /opt/db_template.xml"
/mnt/DMI* -q /opt/dm_template.xml
echo ----"安装完成,配置dmdba的环境变量"---------
echo "DM_HOME=/opt/dmdbms" >> /home/dmdba/.bash_profile
echo "PATH=\$PATH:\$DM_HOME/bin" >> /home/dmdba/.bash_profile
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$DM_HOME/bin" >> /home/dmdba/.bash_profile
source /home/dmdba/.bash_profile

cat >>/etc/security/limits.conf<<EOF
dmdba soft nofile 65536
dmdba hard nofile 65536
dmdba soft core unlimited
dmdba hard nproc 65536
EOF

标签:opt,dmdba,dm,xml,数据库,echo,template,dm8,安装
来源: https://www.cnblogs.com/feiyun8616/p/15872072.html