For this recipe, we will need at least three PostgreSQL servers. As before, we'll assume they are named pg1, pg2, and pg3. Follow these steps on all three servers except where indicated:
- Extract and install Patroni by running the following commands as a root-capable user:
tar -xzf v1.1.tar.gz cd patroni-1.1 sudo python setup.py install
- Continue by fixing any adversely affected Python libraries with this set of commands:
export FIXDIR=$(python -c \ 'import site; print(site.getsitepackages()[0])') sudo chmod -R a+r $FIXDIR sudo find $FIXDIR -type d -exec chmod a+x {} \;
- Execute this command to find where the PostgreSQL binaries are stored:
pg_config --bindir
- Now create a configuration directory for Patroni that ...