Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extend installation guide with apt.postgresql.org #53

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 29 additions & 6 deletions _setup/001-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,33 @@ For Mac

[Postgres App](http://www.postgresapp.com)

For Ubuntu
For APT installations
----------
(Debian / Ubuntu)

sudo apt-get install postgresql
You can install postgresql directly via the repositories provided by the linux distribution:

`apt-get install postgresql`

As an recommended alternative, you can add the postgresql repository, which is explained [in there wiki](https://wiki.postgresql.org/wiki/Apt).

(Example used is for PostgreSQL 9.4 on Debian 8 x64)

1. Create the repository file:

`echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list`

2. Import their key:

`apt-get install -y wget ca-certificates; wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -`

3. Update the package cache and install postgres:

`apt-get update; apt-get install -y postgresql-94`

4. To be safe, you can also install the contrib and the devel package to ensure everything is in the same version and not mixed with the ones provided by the distribution itself:

`apt-get install -y postgresql-contrib-9.4 postgresql-server-dev-9.4`

For Windows
-----------
Expand All @@ -26,17 +49,17 @@ For YUM insallations
(Fedora / Red Hat / CentOS / Scientific Linux)


(Example used is for PostgreSQL 9.2 on CentOS 6.4 x64)
(Example used is for PostgreSQL 9.4 on CentOS 7.1 x64)

1. Head over to [PostgreSQL Yum Repository](http://yum.postgresql.org/)
2. Select the version of PostgreSQL that you want to install and then your OS, version and architecture.
3. Download the RPM for your platform (using the link from step 2)

`curl -O http://yum.postgresql.org/9.2/redhat/rhel-6-x86_64/pgdg-centos92-9.2-6.noarch.rpm`
`curl -O http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm`

4. Install the RPM

rpm -ivh pgdg-centos92-9.2-6.noarch.rpm
yum install -y pgdg-centos94-9.4-1.noarch.rpm

5. Do a quick search which will show you available packages for postgres

Expand All @@ -46,4 +69,4 @@ For YUM insallations

6. Install Packages as per choice

yum install postgresql92-server.x86_64 postgresql92-contrib.x86_64 postgresql92-devel.x86_64
yum install postgresql94-server.x86_64 postgresql94-contrib.x86_64 postgresql94-devel.x86_64