Repo postgresql » Historie » Version 1
  Jeremias Keihsler, 12.01.2017 09:17 
  
| 1 | 1 | Jeremias Keihsler | h1. postgresql repository | 
|---|---|---|---|
| 2 | |||
| 3 | h2. preliminary note | ||
| 4 | |||
| 5 | the postgresql repo contains the latest version of postgresql and is updated frequently. As a result the postgresql-packages of the base system must be excluded | ||
| 6 | |||
| 7 | h2. Download postgresql package | ||
| 8 | |||
| 9 | latest repo-package from | ||
| 10 | * http://www.pgrpms.org/repopackages.php | ||
| 11 | as of 2013-09-12 this is @pgdg-centos93-9.3-1.noarch@ | ||
| 12 | |||
| 13 | h2. Install Package | ||
| 14 | |||
| 15 | <pre><code class="bash"> | ||
| 16 | yum install pgdg-centos93-9.3-1.noarch.rpm | ||
| 17 | </code></pre> | ||
| 18 | |||
| 19 | This will add a yum repository config file and import the appropriate GPG keys. | ||
| 20 | |||
| 21 | h2. Exclude postgresql in Base-Repo | ||
| 22 | |||
| 23 | In order to use PGDG repository properly, you may need to exclude postgresql packages from the repository of the distro. Here are the steps: | ||
| 24 | |||
| 25 | <pre><code class="bash"> | ||
| 26 | cd /etc/yum.repos.d | ||
| 27 | </code></pre> | ||
| 28 | On CentOS, edit @CentOS-Base.repo@. | ||
| 29 | <pre><code class="bash"> | ||
| 30 | vim CentOS-Base.repo | ||
| 31 | </code></pre> | ||
| 32 | Add to the bottom of the sections @[base]@ and @[updates]@: | ||
| 33 | <file> | ||
| 34 | exclude=postgresql* | ||
| 35 | </file> | ||
| 36 | |||
| 37 | h2. Test | ||
| 38 | |||
| 39 | the listing of available repositories should now include @pgdg93@ | ||
| 40 | <pre><code class="bash"> | ||
| 41 | yum repolist | ||
| 42 | </code></pre> |