473,416 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,416 developers and data experts.

How to deploy AntDB Community Version on a virtual machine on VMware Workstation—P2

26 16bit
Ⅱ. Download AntDB Community Version
Download at: http://www.antdb.net/download, choose X86 version under Open Euler

Ⅲ. Deploy AntDB Community Version
AntDB supports both centralized and distributed deployment methods, in practice, customers can flexibly choose the suitable deployment method according to their actual business situation.

In order to help you better complete the AntDB Community Version deployment, the AntDB database team has prepared a guidance document at:http://www.antdb.net/72_install,we can refer to the guidance document for AntDB Community Version deployment.
A.Centralized Deployment

Centralized deployment can be divided into centralized stand-alone deployment and centralized highly available cluster deployment, where stand-alone deployment is used for testing and single node use, and highly available cluster deployment is used for production environment to ensure high availability.

1.Centralized Stand-alone Deployment
Take 192.168.37.130 machine as an example, use CRT tool or xshell, etc., to login to the server.

1). Create a user
useradd -d /home/antdb -m antdb

2). Change the password
passwd antdb
Change the password of the user antdb
New password:
Retype the new password:
passwd: All authentication tokens have been successfully updated

3). Copy the installation package (antdb-ce-7.2.0.openeuler20.x86_64.tar.gz) to the directory of /home/antdb, and modify the permissions of the package.
chown -R antdb:antdb antdb-ce-7.2.0.openeuler20.x86_64.tar.gz

4). Switch to antdb user and unzip
su – antdb
tar xf antdb-ce-7.2.0.openeuler20.x86_64.tar.gz

5). Enter to the package directory and deploy the database
cd antdb-ce-7.2.0.openeuler20.x86_64

sh antdb_install.sh

The output steps are as follows:



At this point, the centralized standalone deployment of AntDB Community Version is completed. You can login to the database to operate, and the operation method is in line with the common operation habits of DBAs (database administrators), so if you have previous experience in using other transactional databases, you can easily get started.

2.Centralized High Available Cluster Deployment
1). Since the installation method is the same, the high available cluster deployment directly uses the software already installed on the standalone machine. Stop the deployed centralized standalone machine and keep the deployed software directory unchanged
pg_ctl stop -D /home/antdb/app/antdb/data/

2). Configure ssh-free between servers, configure sudo privileges for antdb users
ssh-keygen -t rsa
ssh-copy-id 192.168.37.130
ssh-copy-id 192.168.37.131
ssh-copy-id 192.168.37.132

visudo (operate on 3 machines)



3). Turn off the firewall, selinux (operate on 3 machines)
systemctl stop firewalld.service
systemctl status firewalld.service

vi /etc/selinux/config (Modifying selinux requires a reboot of the host, operate on 3 machines)



Temporary shutdown can be done with setenforce 0

4). Edit the high available deployment configuration file
cd /home/antdb/antdb-ce-7.2.0.openeuler20.x86_64/setup/common


vi initconf-c.ini
## clusterinfo configuration item description:
##
## cluster_type Classification:
## C_ALONE indicates a centralized standalone version: only clusterinfo and primaryinfo need to be set
## C_HA indicates centralized high available version: configuration information of primaryinfo, standbyinfo, etcdinfo, patroniinfo needs to be set
## cluster_name: name of the database cluster
## cluster_user: The superuser of the database, usually is the operating system user who executes this installer

[clusterinfo]
cluster_type = C_HA ###change the cluster type as C_HA
cluster_name = antdbcluster
cluster_user = antdb


## primaryinfo configuration description:
##
## antdb_apppath: the program directory of primary node database
## antdb_datapath: the data directory of the primary node database; it needs to be set as an empty directory and not crossed with the directories in other configuration items
## antdb_password: the initial password for the superuser of the database (see "cluster_user" for the superuser)
## antdb_port: the port number of the primary node database
## primary_ip: the primary node database ip, i.e. the host ip where this installer is executed
## primary_sshport: the SSH service port number of the host executing this installer

[primary_info]
primary_ip = 192.168.37.130 ###Modify to the current host IP address
primary_sshport = 22
antdb_apppath = /home/antdb/app/antdb ###antdb software directory, modify it to the current antdb software directory
antdb_datapath = /home/antdb/data ### antdb data directory
antdb_password = antdb
antdb_port = 6655 ###You can customize the port, here choose the default 6655


## standbyinfo configuration item description:
##
## standby_node format: name,standby_ip,standby_sshport,antdb_apppath,antd b_datapath,antdb_port
## name: the name of the standby node, only as an identifier, unique
## standby_ip: the ip address of the standby node
## standby_sshport: the SSH service port number of the standby node
## antdb_apppath: the directory where the standby node stores the database application, it is recommended to use the same path as the primary node
## antdb_datapath: the directory where the standby node stores database data, it is recommended to use the same path as the primary node
## antdb_port: the port number of the standby node database

[standby_info]
standby_node = standby1,192.168.37.131,22,/home/antdb/app/antdb,/home/antdb/data,6655 ### the IP address is changed to the IP address of the corresponding standby database, and the rest remains unchanged.
standby_node = standby2,192.168.37.131,22,/home/antdb/app/antdb,/home/antdb/data,6655 ### the IP address is changed to the IP address of the corresponding standby database, and the rest remains unchanged.


## etcd_info configuration item description:
##
## etcd_node format: name,etcd_datapath,clienport,peerport,hostinfo
## name: the name of etcd node, unique
## etcd_datapath: the etcd data directory, do not cross with database data directory
## clienport: the port number used by client to access etcd
## peerport: the etcd communication port number
## hostinfo: database node name, primary means primary node, others are standby node names; it identifies which database node is on the same node as etcd

[etcd_info]
etcd_node = etcd-1,/home/antdb/etcd,12379,12380,primary
etcd_node = etcd-2,/home/antdb/etcd,12379,12380,standby1
etcd_node = etcd-3,/home/antdb/etcd,12379,12380,standby2


## patroni_info configuration item description:
##
## patroni_node format: name,patroni_port,hostinfo
## name: the name of patroni node, unique
## patroni_port: the port number used by the patroni service
## hostinfo: database node name, primary means primary node, others are standby node names; it identifies which database node is located on the same node aspatroni

[patroni_info]
patroni_node = patroni-1,8008,primary
patroni_node = patroni-2,8008,standby1
patroni_node = patroni-3,8008,standby2

5). Execute initialization
sh antdb_init.sh -c ./setup/common/initconf-c.ini


...
...



AntDB init succeeds appears, the centralized highly available version is deployed.

6). After deployment, antdb will dynamically adjust the OS parameter limits, resource usage limits, and database parameters according to the server resource configuration

cat /etc/security/limits.conf ###resource limits



database parameters



7). High Availability Test
Using adb_list, you can view the cluster status



The native patronictl command can also be used for that purpose



Execute cluster switch, the master of the cluster switched from 130 to 132

Jun 14 '23 #1
0 19595

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Terry Murray | last post by:
Hi Everybody: I am being told that I need to download and install the Java Virtual Machine when trying run a simple applet. Can anyone point me to a url where I can download it? I am having...
12
by: tmb | last post by:
1 - Is Microsoft dotnet a Virtual Machine... like the Java Virtual Machine... that will run on any operating system? 2 - If so, does Microsoft give away the dotnet development system like Sun...
6
by: DraguVaso | last post by:
Hi, I have a, maybe strange looking, question: Is there any way to obstruct developpers to Develop and or Deploy a newer version of a VB.NET-application? Things should happen like this: -...
0
by: ccrabfo | last post by:
Has anyone ever implemented embedding a "virtual host" or "virual machine" environment inside your C/C++ programs so that end-users could write small snippets of customized code, compile it using...
43
by: Minti | last post by:
Hi there everybody, I was just wondering that too many people choose to use language like Java because of its architecture independence, this AI is achieved because Java is as such a...
0
by: Michiel | last post by:
Hello, Can anyone give me an idea of what classes/interfaces I could use when I want to detect the presence of a virtual machine (VMware, Virtual PC) on a user's system ? Both managed and...
7
by: Philippe Poulard | last post by:
Hi, RefleX 0.1.3, a general-purpose XML Virtual Machine, is available here : http://reflex.gforge.inria.fr/ In this release, you'll find tutorials for mapping SQL to arbitrary complex XML...
5
Niheel
by: Niheel | last post by:
How can i access and edit files in my vmware virtual machine from my host machine(code editor)? The host machine is vista. The virtual machine is CentOS. VMware workstation 6.5.2 I'd like...
0
by: antdb | last post by:
B.Distributed Deployment 1). Deploy the distributed software sh antdb_install.sh ### the difference between distributed and centralized software deployment is as follows...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.