Skip to content

Instantly share code, notes, and snippets.

@jonkaya
Last active December 29, 2015 19:59
Show Gist options
  • Save jonkaya/7720439 to your computer and use it in GitHub Desktop.
Save jonkaya/7720439 to your computer and use it in GitHub Desktop.
Installer script of Postgresql 9.3 for Centos 6.x
#!/bin/bash
sed -i "s/\[base\]/\[base\]\nexclude=postgresql*/" /etc/yum.repos.d/CentOS-Base.repo
curl -O http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
rpm -ivh pgdg-centos93-9.3-1.noarch.rpm
rm -f pgdg-centos93-9.3-1.noarch.rpm
yum install postgresql93-server -y
service postgresql-9.3 initdb
chkconfig postgresql-9.3 on
service postgresql start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment