From: Petr Jelinek Date: Tue, 24 Mar 2015 22:11:29 +0000 (+0100) Subject: doc: Debian/Ubuntu installation docs X-Git-Url: http://git.postgresql.org/gitweb/static/%7B%7Bpguslink%28?a=commitdiff_plain;h=e2e5f3c83a2f87e50ca572a1281162f822b8e24c;p=2ndquadrant_bdr.git doc: Debian/Ubuntu installation docs --- diff --git a/doc/install-packages.sgml b/doc/install-packages.sgml index d48cae5d23..b0dea24b69 100644 --- a/doc/install-packages.sgml +++ b/doc/install-packages.sgml @@ -186,16 +186,147 @@ - Installing from packages on Debian or Ubuntu + Debian or Ubuntu - At time of writing packages for Debian and Ubuntu are available from + Packages for Debian and Ubuntu are available from http://packages.2ndquadrant.com/bdr/apt/. - Debian and Ubuntu packaging is still subject to ongoing development - and may change. See bdr-project.org - for the latest information. + + Adding the BDR repository + + + To install &bdr; or &udr; from DEBs you first need to add the BDR + repository to your sever. + + + + + The packages are signed with 2ndQuadrant's master packaging/releases + signing key. See . + + + + + Create /etc/apt/sources.list.d/2ndquadrant.list with following + contents. Note that the distributions are called + codename-2ndquadrant. In the example, replace + wheezy with the actual distribution you are using: + + deb http://apt.postgresql.org/pub/repos/apt/ wheezy-pgdg main + + (You may determine the codename of your distribution by running lsb_release + -c). + + + + Import the repository key from http://packages.2ndquadrant.com/bdr/apt/AA7A6805.asc, + update the package lists, and start installing packages: + + wget --quiet -O - http://packages.2ndquadrant.com/bdr/apt/AA7A6805.asc | sudo apt-key add - + sudo apt-get update + sudo apt-get install postgresql-9.4-udr-plugin + + + + + + + Installing PostgreSQL &pgmajorversion; and &bdr; from packages for Debian or Ubuntu + + + Remove the <literal>postgresql-9.4</literal> packages, if installed + + + If you don't already have PostgreSQL &pgmajorversion; installed, simply skip this step. + + + + &bdr; requires a patched version of PostgreSQL &pgmajorversion; + that conflicts with the official packages. If you already have PostgreSQL + &pgmajorversion; installed either from apt.postgresql.org or your official + distribution repository, you will need to make a dump of all your + databases, then uninstall the official PostgreSQL &pgmajorversion; + packages before you can install &bdr;. + + + + The BDR Debian packages cannot co-exist with stock PostgreSQL + &pgmajorversion;. However BDR uses the same data directory as + stock &pgmajorversion;, to ensure the compatibility with system utilities, + so you should always first backup the existing instalation before trying + to install the BDR PostgreSQL packages. + + + + Once you have fully backed up all your databases: + + sudo apt-get remove postgresql-9.4 + + Check the list of packages to be removed carefully, + approve the removal if appropriate, and proceed with the removal. + + + + + + Install the &bdr; packages + + + To differentiate between the &bdr; specific packages and vanilla + PostgreSQL packages all the package names start with + postgresql-bdr instead of plain postgresql. + So if you want to install the PostgreSQL package with BDR patches + you should run: + + sudo apt-get update + sudo apt-get install postgresql-bdr-9.4 + + + + + + If you attempt to to install this package when you already have + postgresql-9.4 installed you will get informed that the official package + will be removed and confirmation will be required. Do not + remove the old packages if you have existing data directory! + + + + + Once &bdr; is installed you will need to initdb a new database, + make any required changes to postgresql.conf + and pg_hba.conf, etc, as per any new + PostgreSQl install. This works with standard system utilities like + pg_createcluster. + + + + You can then proceed with BDR-specific configuration per + and . + + + + + + + + Installing &udr; from packages for Debian or Ubuntu + + + To install &udr; install PostgreSQL &pgmajorversion; from apt.postgresql.org as + normal. Then add the BDR repository as outlined above. + Finally, install the UDR package: + + sudo apt-get update + sudo apt-get install postgresql-9.4-udr-plugin + + + + +