Installation – Linux

Installation – Linux

List what is available in the enabled repositories on your CentOS Install:
yum info postgresql-server.x86_64 | grep Version
Select a newer version form http://yum.postgresql.org/
yum install http://yum.postgresql.org/9.3/redhat/rhel-7-x86_64/pgdg-centos93-9.3-1.noarch.rpm
# if you are using priorities add some to /etc/yum.repos.d/pgdg-93-centos.repo
yum install postgresql93-contrib
service postgresql-9.3 initdb
service postgresql-9.3 start
Directories of interest are:
conf/var/lib/pgsql/9.3/data/
data/var/lib/pgsql/9.3/data/base/

List what is available in the enabled repositories on your Ubuntu install:
apt-cache search postgresql | grep -P "^postgresql-[0-9\.]+ "
Install the latest version:
R=$(lsb_release -c | perl -pe 's/.*\t//g')
echo "deb http://apt.postgresql.org/pub/repos/apt/ "$R"-pgdg main" > /etc/apt/sources.list.d/pgdg.list
apt-get install wget ca-certificates
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
apt-get update
apt-get upgrade
P=$(apt-cache search postgresql | grep -P "^postgresql-contrib-[0-9\.]+ " | sort | tail -n 2 | head -n 1 | perl -pe 's/ .*//g')
apt-get install $P
Directories of interest are:
conf/etc/postgresql/9.4/main/
data/var/lib/postgresql/9.4/main/base/

There are numerous backup methods generally complete or partial, hot or cold.

A simple method is a cold complete backup:

  • Stop Noodle
  • Stop the database
  • Copy the database folder and the Noodle folder
  • Start the database
  • Start Noodle
  • Send the folder copies to a different physical location

More options for database backups include:

  • Hot complete backups: allow a snapshot of your database without stopping anything.
  • Hot partial backups: can be used to backup only recent changes, allow for point in time recovery, and reduce server load.
  • Hot partial backups: can also be used to keep a warm backup server in case of disaster - at any time it will be a usable exact copy of your production database.
  • Cold partial backups: can decrease the time of a cold complete backup.

Production environments should select a backup strategy to maximize flexibility while reducing server load and storage requirements.

For details on backup options please read your database documentation.

Also see  the windows postgres example

Windows

  • The Windows installer will make a service automatically for you.

Linux

  • The Linux installer defaults to not adding a Noodle service.
  • Systemd:
    1. cp /opt/Noodle/noodle.service /lib/systemd/system/
    2. systemctl enable noodle
  • init
    1. cp /opt/noodle/noodle.daemon /etc/init.d/noodle
    2. Enable the service:
      • debian: update-rc.d noodle defaults
      • red hat: chkconfig --add noodle;chkconfig noodle on;