Ubuntu 14.10 でデフォルトの 9.4 の代わりに Postgresql 9.3 をインストールするにはどうすればいいですか?

Ubuntu 14.10 でデフォルトの 9.4 の代わりに Postgresql 9.3 をインストールするにはどうすればいいですか?

私は Utopic Unicorn を使っていて、Postgresql 9.3 サーバーとクライアントをインストールする必要があります。オートコンプリートを試みるとsudo apt-get install postgres、9.4 パッケージしか表示されません。

postgresql                          postgresql-autodoc
postgresql-9.4                      postgresql-client
postgresql-9.4-asn1oid              postgresql-client-9.4
postgresql-9.4-dbg                  postgresql-client-common
postgresql-9.4-debversion           postgresql-common
postgresql-9.4-ip4r                 postgresql-comparator
postgresql-9.4-orafce               postgresql-contrib
postgresql-9.4-pgespresso           postgresql-contrib-9.4
postgresql-9.4-pgextwlist           postgresql-doc
postgresql-9.4-pgfincore            postgresql-doc-9.4
postgresql-9.4-pgmemcache           postgresql-filedump
postgresql-9.4-pgmp                 postgresql-hll
postgresql-9.4-pgpool2              postgresql-plperl-9.4
postgresql-9.4-pgq3                 postgresql-plpython3-9.4
postgresql-9.4-pgrouting            postgresql-plpython-9.4
postgresql-9.4-pgrouting-doc        postgresql-pltcl-9.4
postgresql-9.4-pllua                postgresql-prioritize
postgresql-9.4-plproxy              postgresql-server-dev-9.4
postgresql-9.4-plr                  postgresql-server-dev-all
postgresql-9.4-plsh                 postgres-xc
postgresql-9.4-plv8                 postgres-xc-client
postgresql-9.4-postgis-2.1          postgres-xc-contrib
postgresql-9.4-postgis-2.1-scripts  postgres-xc-dbg
postgresql-9.4-postgis-scripts      postgres-xc-doc
postgresql-9.4-prefix               postgres-xc-plperl
postgresql-9.4-preprepare           postgres-xc-plpython
postgresql-9.4-repmgr               postgres-xc-pltcl
postgresql-9.4-slony1-2             postgres-xc-server-dev

9.3 バージョンをインストールするにはどうすればいいですか?

答え1

公式の postgres PPA / Apt リポジトリを追加します。サポートされているすべてのバージョンのパッケージが含まれています。

見る:http://www.postgresql.org/download/linux/ubuntu/

  • ファイルを作成し/etc/apt/sources.list.d/pgdg.list、リポジトリの行を追加します
    • deb http://apt.postgresql.org/pub/repos/apt/ utopic-pgdg main
  • リポジトリ署名キーをインポートし、パッケージリストを更新する
    • wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | \ sudo apt-key add -
    • sudo apt-get update

答え2

からPostgreSQL ダウンロード ページ:

Ubuntu のバージョンに含まれているバージョンが希望するものではない場合は、PostgreSQL Apt リポジトリを使用できます。このリポジトリは通常のシステムおよびパッチ管理と統合され、PostgreSQL のサポート期間中、サポートされているすべてのバージョンの PostgreSQL の自動更新を提供します。

PostgreSQL apt リポジトリは、amd64 および i386 アーキテクチャ上の Ubuntu の LTS バージョン (10.04 および 12.04) をサポートしています。完全にサポートされているわけではありませんが、利用可能な最も近い LTS バージョンを使用することで、パッケージは非 LTS バージョンでも動作することがよくあります。

PostgreSQL リポジトリを追加するには:

sudo tee /etc/apt/sources.list.d/pgdg.list <<EOF
deb http://apt.postgresql.org/pub/repos/apt/ utopic-pgdg main
EOF
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update

(はい、記載されている内容に反して、14.10 をサポートしているようです。)

関連情報