PostgreSQL on Ubuntu 14.04

Its been quite a while since I’ve used PostgreSQL. Here are my install notes:

sudo -s
aptitude update
aptitude dist-upgrade
aptitude install --with-recommends postgresql postgresql-client postgresql-contrib

For my install I will be using pgAdmin III on my workstation (Windows). I’d like to be able to access the database system we just installed above and administer from that workstation.

Change/Set the default password

sudo -u postgres psql postgres
\password
\q

Setup a user

sudo -u postgres createuser --superuser someusername
sudo -u postgres psql
\password someusername

Configure PostgreSQL to listen on all ports edit /etc/postgresql/9.3/main/postgresql.conf
(Use your favorite editor of course)
vi /etc/postgresql/9.3/main/postgresql.conf

Add the line
listen_addresses = '*'

Let’s plan to pound on our new database server so edit the line
max_connections = 100
to
max_connections = 1000

Configure PostgreSQL to allow remote access on all ports edit /etc/postgresql/9.3/main/pg_hba.conf
Add the line
host all all 10.0.0.0 255.0.0.0 md5

Restart the database server
service postgresql restart

That’s it! Install pgAdmin III on your workstation and connect to your new database server

One thought on “PostgreSQL on Ubuntu 14.04

Comments are closed.