Installing PostgreSQL

General Information

Postgre is a very powerful SQL server that’s known for it’s reliability, scaleability, and ability to deliver. adidas zx 500 air max homme nike air huarache soldes basket nike air max 1 adidas stan smith femme I felt it necessary to dig deeper in to the other SQL servers out there; PostgreSQL ended up impressing me the most.


  1. Local root access on the box or having your user in the wheel group so you can su to root.
  2. A SSH client that can support ANSI colors like puTTy or SecureCRT (only if not logging on locally).
  3. Your favorite text editor (I use nano).


As with almost everything on this site, installation is simple and straightforward. nike roshe run nike air max 2014 ugg 2017 louboutin femme adidas chaussures nike free trainer So, login as root or su to root.

 # cd /usr/ports/databases/postgresql7 # make install clean; rehash # su -l pgsql -c initdb 


Now that the database server is installed, you probably want it to do something and be able to accept incoming connections. new balance 2017 soldes timberland bottes ugg nike air max pas cher nike air max 1 timberland soldes First, let’s add a user to the database so we can actually login. buy bns gold ugg pour homme timberland discount Adidas Running ugg homme adidas pas cher As root, su to the user pgsql.

 # /usr/local/bin/createuser username 

Make the username the same as your local login to the server. ugg promo Chaussures Adidas Buy Blade and Soul Gold asics gel lyte 3 bottes ugg pas cher This will make everything easier down the road.

 # cd /usr/local/pgsql/data # nano -w postgresql.conf 

Uncomment the following lines:

 tcpip_socket = false (Change to true) port = 5432 hostname_lookup = false 

There’s some other options in the configuration that google or the postgresql website would probably be really helpful for explanations on. bottes ugg pas cher nike dunk nike air max 1 Louboutin Pas Cher new balance femme nike chaussure The current changes I mentioned is enough to get the server started and accept connections from phpPgAdmin, php, and other such things.

 # nano -w pg_hba.conf 

Find the line that says:

 host all all trusted 

and change it to:

 host all all password passwords 

This will force users to login to the server instead of just being able to type in a valid username on the server and being able to access data.

Speak Your Mind