在CentOS中部署多節(jié)點(diǎn)Citus集群的詳細(xì)步驟
前言
本文主要介紹了關(guān)于CentOS中部署多節(jié)點(diǎn)Citus集群的相關(guān)內(nèi)容,分享出來供大家參考學(xué)習(xí),下面話不多說了,來一起看看詳細(xì)的介紹吧。
1、在所有節(jié)點(diǎn)執(zhí)行以下步驟
Step 01 添加Citus Repostory
# Add Citus repository for package manager curl https://install.citusdata.com/community/rpm.sh | sudo bash
Step 02 安裝Citus并且初始化DB
# install PostgreSQL with Citus extension sudo 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 extension echo "shared_preload_libraries = 'citus'" | sudo tee -a /var/lib/pgsql/10/data/postgresql.conf
Step 03 配置postgresql.conf
sudo vi /var/lib/pgsql/10/data/postgresql.conf
# Uncomment listen_addresses for the changes to take effect listen_addresses = '*'
Step 04 配置pg_hba.conf
sudo vi /var/lib/pgsql/10/data/pg_hba.conf
local all all peer local replication all peer host all all 192.168.99.1/24 trust host all all 0.0.0.0/0 md5
Step 05 配置防火墻
查看
firewall-cmd --zone=public --query-port=5432/tcp
添加5432端口(--permanent永久生效,沒有此參數(shù)重啟后失效)
firewall-cmd --zone=public --add-port=5432/tcp --permanent
重新載入
firewall-cmd --reload
Step 06 啟動服務(wù)
# start the db server sudo service postgresql-10 restart # and make it start automatically when computer does sudo chkconfig postgresql-10 on
Step 07 給需要的數(shù)據(jù)庫安裝Citus擴(kuò)展
sudo -i -u postgres psql -c "CREATE EXTENSION citus;"
Step 08 設(shè)置密碼
postgres=# \password postgres #給postgres用戶設(shè)置密碼 Enter new password: Enter it again:
2、在coordinator節(jié)點(diǎn)額外執(zhí)行以下步驟
Step 01 添加worker節(jié)點(diǎn)信息
添加worker節(jié)點(diǎn)的IP地址(或者DNS名稱)和端口號到pg_dist_node表。
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 驗證安裝是否成功
sudo -i -u postgres psql -c "SELECT * FROM master_get_active_worker_nodes();"
Step 03 開始使用
sudo -i -u postgres psql
總結(jié)
以上就是這篇文章的全部內(nèi)容了,希望本文的內(nèi)容對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,如果有疑問大家可以留言交流,謝謝大家對腳本之家的支持。
參考資料:
https://docs.citusdata.com/en/v7.2/installation/production_rhel.html
相關(guān)文章
Linux系統(tǒng)下Nginx支持ipv6配置的方法
這篇文章主要介紹了Linux系統(tǒng)下Nginx支持ipv6的方法,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2018-12-12阿里云centos7服務(wù)器搭建nginx web服務(wù)經(jīng)驗示例
本篇文章主要介紹了阿里云centos7服務(wù)器搭建nginx web服務(wù)經(jīng)驗示例,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2017-08-08Linux使用fdisk實現(xiàn)磁盤分區(qū)過程圖解
這篇文章主要介紹了Linux使用fdisk實現(xiàn)磁盤分區(qū)過程圖解,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2020-08-08Linux XAMPP下啟用WordPress的自定義文件名(偽靜態(tài))功能
這篇文章主要介紹了Linux XAMPP下啟用WordPress的自定義文件名(偽靜態(tài))功能的相關(guān)資料,需要的朋友可以參考下2016-12-12CentOS7 安裝 zabbix 4.0 教程(圖文詳解)
這篇文章主要介紹了CentOS7 安裝 zabbix 4.0 教程,本文圖文并茂給大家介紹的非常詳細(xì),具有一定的參考借鑒價值,需要的朋友可以參考下2019-10-10Windows上安裝Apache2、PHP5、MySQL5及與Resin配合實現(xiàn)多系統(tǒng)之整合
筆者之前一直使用Resin作為WEB應(yīng)用服務(wù)器,近來有項目需要在已有的JSP系統(tǒng)中整合phpwind系統(tǒng),因此首次嘗試在電腦中配置PHP的運(yùn)行環(huán)境。2010-03-03CentOS 7.2部署郵件服務(wù)器(Postfix)
這篇文章主要為大家詳細(xì)介紹了CentOS 7.2如何部署郵件服務(wù)器Postfix,具有一定的參考價值,感興趣的小伙伴們可以參考一下2016-11-11