本篇文章主要介绍了" postgresql repmgr setup",主要涉及到方面的内容,对于其他数据库感兴趣的同学可以参考一下:
一.soft requires(Master/Slave)OS: CentOS Linux release 7.3.1611 (Core) X641.disab...
一.soft requires(Master/Slave)
OS: CentOS Linux release 7.3.1611 (Core) X64
1.disabled SELINUX
# more /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three two values:
# targeted - Targeted processes are protected,
# minimum - Modification of targeted policy. Only selected processes are protected.
# mls - Multi Level Security protection.
SELINUXTYPE=targeted
2.disabled firewall
systemctl disable firewalld.service
3.install pg repository rpm
pgdg-centos10-10-1.noarch.rpm
https://yum.postgresql.org/repopackages.php
4.install repmgr repository rpm
yum install http://packages.2ndquadrant.com/repmgr/yum-repo-rpms/repmgr-rhel-1.0-1.noarch.rpm
5.install repmgr
# yum install -y repmgr10
# chown postgres.postgres -R /etc/repmgr/10/
# systemctl enable repmgr10.service
6.set postgres user pwd and pg path
### pgdata ###
# mkdir /pgdata10
# chown postgres.postgres /pgdata10/
### pg password ###
# passwd postgres
### pg PATH ###
# su - postgres
-bash-4.2$ vi .bash_profile
[ -f /etc/profile ] && source /etc/profile
PATH=/usr/pgsql-10/bin:$PATH
export PATH
PGDATA=/var/lib/pgsql/10/data
export PGDATA