OPERATING SYSTEMSOS Linux

Cara Replikasi Postgresql On Ubuntu

Habbil Sabdho Pangestu – 20180801188

Vagrant Config :
# -*- mode: ruby -*-
# vi: set ft=ruby :

VAGRANTFILE_API_VERSION = “2”

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

config.vm.define “Master” do |web01|
web01.vm.box = “ubuntu/bionic64”
web01.vm.hostname = “Master”
web01.vm.network :private_network, ip: “10.11.12.51”
end

config.vm.define “Slave” do |web02|
web02.vm.box = “ubuntu/bionic64”
web02.vm.hostname = “Slave”
web02.vm.network :private_network, ip: “10.11.12.52”
end
end

web tutorial :
https://hostadvice.com/how-to/how-to-set-up-replication-on-postgresql-on-ubuntu-18-04-vps-or-dedicated-server/
https://hostadvice.com/how-to/how-to-install-postgresql-database-server-on-ubuntu-18-04/

Change The Last Step Slave :
sudo -u postgres pg_basebackup -h 10.11.12.51 -D /var/lib/postgresql/10/main -U replicationuser -v -P –wal-method=stream

source

ubuntu

Leave a Reply

Your email address will not be published. Required fields are marked *