当前位置:网站首页>2022-07-17 Damon database installation

2022-07-17 Damon database installation

2022-07-28 06:35:00 Don't like milkshakes

install

Official installation manual

1. Download Dameng official iso Mirror image

Download url :https://www.dameng.com/list_103.html

Here, due to the installation to Centos7 On Alibaba cloud , So choose to download CPU platform X86, operating system Centos7 Installation package

2. Close the firewall and SELINUX

Close the firewall and execute the command ( I didn't turn off the firewall here )

systemctl stop firewalld

Use vim:

vim /etc/selinux/config

modify SELINUX:

SELINUX=disabled

3.Linux(Unix) Check the operating system limits

function ulimit -a The query
Parameter usage restrictions :

  1. data seg size

data seg size (kbytes, -d)
It is recommended that the user set it to 1048576( namely 1GB) Above or unlimited( unlimited ), If this parameter is too small, the database will fail to start .

  1. file size

file size(blocks, -f)
It is recommended that the user set it to unlimited( unlimited ), If this parameter is too small, the database installation or initialization will fail .

  1. open files

open files(-n)
It is recommended that the user set it to 65536 Above or unlimited( unlimited ).

  1. virtual memory

virtual memory (kbytes, -v)
It is recommended that the user set it to 1048576( namely 1GB) Above or unlimited( unlimited ), If this parameter is too small, the database will fail to start .

If the user needs to change for the current installation user ulimit Resource constraints , Please modify the file /etc/security/limits.conf.

Here is my operation

cat /etc/security/limits.conf

Add... At the end :

dmdba soft nofile 4096
dmdba hard nofile 65536

4. add to dmdba Users and dinstall User group

1. Create an installation user group dinstall.

groupadd -g 12349 dinstall

2. Create installation users dmdba.

useradd -u 12345 -g dinstall -m -d /home/dmdba -s /bin/bash dmdba

3. Initialize user password .

passwd dmdba

Set the password through the system prompt .

5. Create installation directory

Create directory

mkdir -p /usr/local/dm

6. Check storage space ( Skippable )

  1. DM Complete installation requires 1GB Storage space , Users need to plan the installation directory in advance , Reserve enough storage space . The user is in DM Enough storage space should also be reserved for the database instance before installation , Plan the data path and backup path . You can use the following command to check the storage space :
## Look up the catalog /usr/local/dm Available space 
df -h /usr/local/dm
  1. DM The installer will generate temporary files during installation , Temporary files need 1GB Storage space , The temporary file directory defaults to **/tmp**

If /tmp The catalog does not guarantee 1GB Storage space , Users can extend /tmp Directory storage space or by setting environment variables DM_INSTALL_TMPDIR Specify the temporary directory of the installer . The specific order is as follows :

## With BASH For example ( perform shell, Add global variable ):
mkdir -p /usr/local/dm
DM_INSTALL_TMPDIR=/usr/local/dm
export DM_INSTALL_TMPDIR

7. Set up JAVA Environmental Science ( Skippable )

If you run on the installer and client JAVA The environment has no special needs , This step can be ignored . Before running the setup program , By setting environment variables DM_JAVA_HOME Specify specific JAVA The catalog of , The installer will use this JAVA Environment for installation , And after installation , Client programs will also use this JAVA Environmental Science . The specific order is as follows :

## With BASH For example :
DM_JAVA_HOME=/mount_point/jdk_home_dir
export DM_JAVA_HOME

8. install DM

Mount the disk

Be careful

  1. Not recommended root User to install , Use the previously created dmdba user
  2. Disk space , Mount according to the actual situation , also iso Files can only be mounted

The first kind of Mount : take iso Move to linux On the system

Carry out orders :

#  Create mount directory 
mkdir -p /mnt/dm

mkdir -p /usr/local/dm
#  To be installed .iso Save the file to  /usr/local/dm  Next ( So here I'm going to choose /usr/local/dm As the installation directory ) And create 
 Choosing your own way will .iso The file is kept in /usr/local/dm Under the table of contents 

#  mount 
mount /usr/local/dm/dm8_20220525_x86_rh6_64.iso /mnt/dm

cp /mnt/dm/DMInstall.bin /usr/local/dm/

Set the users and user groups owned by the directory

chown -R dmdba:dinstall /usr/local/dm/

The second kind of Mount : take DM Insert the installation CD into the CD-ROM drive , Then load (mount) CD drive .
Generally, you can load the optical drive by executing the following commands :

mount /dev/cdrom /mnt/cdrom

Here, it is assumed that the file corresponding to the optical drive is /dev/cdrom And the target path /mnt/cdrom Already exists .

load (mount) After optical drive , stay /mnt/cdrom Directory exists DMInstall.bin file ,DMInstall.bin The document is DM Installation procedure . Before running setup , Need to give DMInstall.bin File Execution Authority . The specific order is as follows :

chmod 755 ./DMInstall.bin

Command line installation

Enter the folder where the installer is located at the terminal , Execute the following command for command line installation :

chmod 755 ./DMInstall.bin
su dmdba
./DMInstall.bin -i

setup script : Set the options in the installation according to your personal needs , among key, If not , You can use one year as the starting time according to the release date of the installation ; The installation directory , This is for personal use /usr/local/dm/dmdbms( Choose... According to your personal needs )

After installation : Switch according to the prompt root Command execution prompt

After the above command is executed dm Of bin Add to global variables , Convenient follow-up operation

su dmdba
cd ~
vim .bash_profile

Add... At the end :

export PATH=$PATH:$HOME/bin:$DM_HOME/bin

installation is complete !!

原网站

版权声明
本文为[Don't like milkshakes]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/209/202207280519356765.html