Install Dameng database on ubuntu

Download Dameng database image

Command line installation

Executed by root user (the operation of Dameng 7 and Dameng is the same)

1. Create Dameng database installation directory and data disk

mkdir -p /opt/dm8

(Log in as a normal user without authorization)

Image file mounting directory: mkdir -p /opt/mnt

Change the owner of the installation directory:  chown  ubuntu:dinstall -R /opt/dm8

Change the owner of the image mounting directory: chown ubuntu:dinstall -R /opt/mnt

2. Upload the installation package of the corresponding version and mount it to the specified directory

Enter the opt directory and execute the following command

mount -o loop dm8_setup_rh6_64_sec_8.1.1.88_20200701.iso /opt/mnt

3. Switch to ubuntu user, enter the mnt directory, and install step by step

./DMInstall.bin -i

Step 1: Select the installation language. Please select the appropriate language according to the system configuration, enter the options, and press Enter to proceed to the next step.

Step 2: Verify Key File Users can choose whether to enter the Key file path. If you do not enter it, go to the next step of installation. Enter the Key file path. The installation program will display the detailed information of the Key file. If it is a legal Key file and is within the validity period, the user can continue the installation.

Step 3: Set the time zone input option. The default is China Standard Time. Press Enter to proceed to the next step.

Step 4: Select the installation type (default 1 typical installation), enter the options, and press Enter to proceed to the next step.

Step 5: Select the path to be installed, press Enter to Next Step, confirm the installation path, and press Enter to Next Step.

Step 6: The user confirms the installation information. If you do not confirm, exit the installation program, confirm, and install DM.

Step 7: After the installation is completed, the terminal prompts "Please execute the command as the root system user: /dm8/script/root/root_installer.sh". Since a non-root system user is used for installation, some installation steps do not have corresponding system permissions and require the user to manually execute relevant commands.

4. Initialize the instance

After the database installation is completed, you still need to initialize the database instance to officially run the Dameng database. Use the installation user ubuntu to initialize the database, switch to the bin directory of the installation directory, enter ./dminit help to view detailed information, data page size, case-sensitive, The character set cannot be modified after initialization. Please confirm with the customer before proceeding.

The initialization example is as follows: (For local test environment, the instance is installed under /dm8/data, and the production environment needs to be installed under the largest disk path /dmdata)

./dminit PATH=/opt/dm8/data PAGE_SIZE=16 CASE_SENSITIVE=1 CHARSET=0 DB_NAME=SYSDBA INSTANCE_NAME=RAC PORT_NUM=9003

Start the database: In the bin directory of the installation directory, add the server name and the path to the instance. This startup interface method will stop the database after the interface is closed. (can be turned off)

./dmserver /dm8/data/DMDB/dm.ini

5. To create a database service, you need to use the root user in the installation directory script/root.

Examples are as follows:

./dm_service_installer.sh -t dmserver -p DMSERVER -dm_ini /opt/dm8/data/SYSDBA/dm.ini

(达梦7:./dm_service_installer.sh -t dmserver -p DMSERVER -i /opt/dm7/data/SYSDBA/dm.ini)

After successful creation, start the database service

systemctl start DmServiceDMSERVER

Or install it in the bin directory

./DmServiceDMSERVER start

6. Log in to the database

Switch to ubuntu. If you configure environment variables, you can directly enter disql. If there is no configuration, enter ./disql in the installation bin directory.

./disql SYSDBA/SYSDBA@localhost:5236

7. Dameng database uninstallation steps

Stop the Dameng service first: systemctl stop DmServiceDMSERVER

Uninstall the service/dm8/script/root:

./dm_service_uninstaller.sh -n DmServiceDMSERVER

Check if there is still a service systemctl status DmServiceDMSERVER

Delete the instance rm -rf /dm8/data

Uninstall database/dm8 ./uninstall.sh -i

Delete the mirror mounting folder (read-only file system)

1). Cancel mounting

umount /opt/mnt

2), delete files

rm -rf /opt/mnt

Query table: SELECT TABLE_NAME FROM USER_TABLES;

Guess you like

Origin blog.csdn.net/LforikQ/article/details/130736904