Install Dameng database
1. Introduction to Dameng Database (DM8)
Dameng database management system is a high-performance database management system with completely independent intellectual property rights launched by Wuhan Dameng Company, referred to as DM. The latest version of Dameng database management system is version 8.0, referred to as DM8.
DM8 is a new generation of self-developed database launched by Dameng Company on the basis of summarizing the R&D and application experience of DM series products and adhering to the concept of open innovation, simplicity and practicality. DM8 absorbs the advantages of current advanced new technology ideas and mainstream database products, integrates the advantages of distributed, elastic computing and cloud computing, and has made large-scale improvements in flexibility, ease of use, reliability, and high security. The diversified architecture fully meets the needs of different scenarios, supports ultra-large-scale concurrent transaction processing and transaction-analysis hybrid business processing, and dynamically allocates computing resources to achieve more refined resource utilization and lower cost investment. A database can meet various needs of users, allowing users to focus more on business development.
2 Operating system environment preparation
The system version used this time is CentOS Linux release 7.5.1804 (Core)
3. Upload required files
4. Create the installation user dmdba and the group dinstall, and set the user password
[root@localhost ~]# groupadd dinstall
[root@localhost ~]# useradd -s /bin/bash -m -d /home/dmdba -g dinstall dmdba
[root@blocalhost ~]# passwd dmdba //这里需要设置一个密码,可以设置为 Admin12345
Enter twice successfully
5. Turn off SELinux
vi /etc/selinux/config
The red part is changed to disabled
6. Configure system resource limits for dmdba
cd /etc/security/limits.d
vi dmdba.conf
Put the following into it and save
dmdba soft nofile 65536
dmdba hard nofile 65536
dmdba soft nproc 4096
dmdba hard nproc 63653
dmdba soft core unlimited
dmdba hard core unlimited
Press esc , then press : wq! Save and exit
Log in to the system as the dmdba user to check whether the ulimit parameter is in effect: ulimit -a (Note: switch to the dmdba user to check)
su dmdba
7. Install DM8
Switch back to root account, switch account password is su
mkdir -p /opt/db/dm
chown -R dmdba:dinstall /opt/db/dm
chmod -R 775 /opt/db/dm
ll /opt/db
8. Unzip the file
cd /home/dm8
unzip dm8_20220701_x86_rh6_64_ent.zip //如果这里报错没有找到unzip,需要用yum install unzip 如果是离线环境可是去现在一个二进制的包文件进行安装
Mount the iso file so that you can access the iso image file like a directory
mkdir -p /mnt/cdrom
mount /home/dm8/dm8_20220701_x86_rh6_64_ent/dm8_20220701_x86_rh6_64_ent_8.1.2.128.iso /mnt/cdrom
Copy the installation program DMInstall.bin to the installation directory, and modify the user and group
cd /opt/db/dm
cp /mnt/cdrom/DMInstall.bin /opt/db/dm/
Next, execute the installer to install the database. There are two installation methods, one is GUI installation, and the other is command line installation.
Because there is no graphical interface installed when installing Linux in this demonstration environment, the command line is used for installation.
The graphical installation method is to execute the command: ./DMInstall.bin
The command line installation method is to execute the command: ./DMInstall.bin -i
To install DM, you must first switch to the dmdba user.
su - dmdba
cd /opt/db/dm
mkdir dmdbms
Start the installation, select Chinese as the language, and do not enter the Key file (there is no key file, and it will expire after one year by default)
To set the time zone, select: [21]: GTM+08=China Standard Time, which is also the default option.
9. Start the installation
./DMInstall.bin -i
The following address is /opt/db/dm/dmdbms
After the installation is complete, prompt to execute the script with the root user
switch root user
su
/opt/db/dm/dmdbms/script/root/root_installer.sh
10. Create a database instance
cd /opt/db/dm/dmdbms/bin
./dminit PATH=/opt/db/dm/dmdbms/data DB_NAME=DMDB INSTANCE_NAME=DMDW PORT_NUM=5236
11 script to register instance service
cd /opt/db/dm/dmdbms/script/root
./dm_service_installer.sh -t dmserver -dm_ini /opt/db/dm/dmdbms/data/DMDB/dm.ini -p DMDW
12. Start the service
systemctl start DmServiceDMDW.service //这里需要等待一会
Check whether the service process has been started (the green below means the start is successful)
systemctl status DmServiceDMDW.service
12. Create a soft connection
Dameng database provides a command-line client tool disql (similar to oracle's sqlplus) for connecting to the database.
The disql tool is in the bin directory of the installation directory, you can add the bin directory to the environment variable PATH, and view the configuration file under the dmdba user
su dmdba
vi ~/.bash_profile
export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool 把这个插入进去
take effect
source ~/.bash_profile
In this way, we can use commands to log in to the database anywhere
disql SYSDBA/SYSDBA
Switch root user to use soft connection
su
vi ~/.bash_profile
Insert the following data into the specified location
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/db/dm/dmdbms/bin"
export DM_HOME="/opt/db/dm/dmdbms"
export PATH=$PATH:$DM_HOME/bin:$DM_HOME/tool
take effect
source ~/.bash_profile
At this point, the Dameng database installation is complete
- Author of this article: Beicheng Qing
- Link to this article: Install Dameng Database 8 on linux - Beichengqing - Blog Park