Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Detailed steps for deploying a multi-node Citus cluster in CentOS

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Preface

This article mainly introduces the relevant content about the deployment of multi-node Citus cluster in CentOS, which is shared for your reference and study. I won't say much below, let's take a look at the detailed introduction.

1. Perform the following steps on all nodes

Step 01 add Citus Repostory

# Add Citus repository for package managercurl https://install.citusdata.com/community/rpm.sh | sudo bash

Step 02 install Citus and initialize DB

# install PostgreSQL with Citus extensionsudo yum install-y citus72_10# initialize system database (using RHEL 6 vs 7 method as necessary) sudo service postgresql-10 initdb | | sudo / usr/pgsql-10/bin/postgresql-10-setup initdb# preload citus extensionecho "shared_preload_libraries = 'citus'" | sudo tee-a / var/lib/pgsql/10/data/postgresql.conf

Step 03 configure postgresql.conf

Sudo vi / var/lib/pgsql/10/data/postgresql.conf# Uncomment listen_addresses for the changes to take effectlisten_addresses ='*'

Step 04 configure pg_hba.conf

Sudo vi / var/lib/pgsql/10/data/pg_hba.conflocal all all peer local replication all peerhost all all 192.168.99.1/24 trusthost all all 0.0.0.0/0 md5

Step 05 configure Firewall

View

Firewall-cmd-zone=public-query-port=5432/tcp

Add port 5432 (--permanent takes effect permanently, without this parameter to expire after restart)

Firewall-cmd-zone=public-add-port=5432/tcp-permanent

Reload

Firewall-cmd-reload

Step 06 start the service

# start the db serversudo service postgresql-10 restart# and make it start automatically when computer doessudo chkconfig postgresql-10 on

Step 07 installs Citus extensions to the required databases

Sudo-I-u postgres psql-c "CREATE EXTENSION citus;"

Step 08 set password

Postgres=#\ password postgres # set the password for the postgres user Enter new password: Enter it again:

2. Perform the following additional steps on the coordinator node

Step 01 add worker node information

Add the IP address (or DNS name) and port number of the worker node to the pg_dist_ node table.

Sudo-I-u postgres psql-c "SELECT * from master_add_node ('192.168.99.101, 5432);" sudo-I-u postgres psql-c "SELECT * from master_add_node (' 192.168.99.102, 5432);"

Step 02 verify that the installation is successful

Sudo-I-u postgres psql-c "SELECT * FROM master_get_active_worker_nodes ();"

Step 03 comes into use

Sudo-I-u postgres psql

Summary

The above is the whole content of this article, I hope that the content of this article has a certain reference and learning value for your study or work, if you have any questions, you can leave a message and exchange, thank you for your support.

Reference:

Https://docs.citusdata.com/en/v7.2/installation/production_rhel.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report