Skip to content

Instantly share code, notes, and snippets.

@jourdein
Last active December 21, 2016 01:35
Show Gist options
  • Save jourdein/5412399 to your computer and use it in GitHub Desktop.
Save jourdein/5412399 to your computer and use it in GitHub Desktop.
Postgresql 9.1 On Ubuntu 12.10 Linux (Quantal Quetzal)
# STEP 1: VERIFY THAT YOU DO NOT ALREADY HAVE POSTGRESQL INSTALLED ON YOUR SYSTEM
ps ax | grep postgres
# STEP 2: INSTALL POSTGRESQL ON YOUR SYSTEM
sudo apt-get update
sudo apt-get install postgresql-9.1
# List All Postgres related packages
dpkg -l | grep postgres
# * No PostgreSQL clusters exist; see "man pg_createcluster"
# STEP 2.1: CREATES A NEW POSTGRESQL SERVER CLUSTER
# http://serverfault.com/a/234993
pg_lsclusters
pg_createcluster 9.1 main --start
# STEP 2.2: change user to the PostgreSQL user
sudo su - postgres
# STEP 3: CONFIGURE YOUR POSTGRESQL PASSWORD
#IF changed to user Postgre already
psql -d postgres -U postgres
#ElSE
sudo -u postgres psql template1
#ENDIF
# set password
\password postgres
# ALTER USER postgres with encrypted password 's0meth1ng'; ALTER ROLE
# \q OR ctrl-d
# install other optional packages
# apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
# -----------------
# Create database
# sudo -u postgres createdb mydb
# -----------------
# References:
# 1. https://help.ubuntu.com/community/PostgreSQL
# 2. http://hendrelouw73.wordpress.com/2012/11/14/how-to-install-postgresql-9-1-on-ubuntu-12-10-linux/
# 3. http://www.howtoforge.com/installing-nginx-with-php5-and-php-fpm-and-mysql-support-lemp-on-ubuntu-12.10
@deloschang
Copy link

Thanks!!

@crossle
Copy link

crossle commented Feb 25, 2014

Thanks!. Haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment