Installing PostgreSQL
Updated: 11/27/2004
General Information
Postgre is a very powerful SQL server that's known for it's reliability, scaleability, and ability to deliver. I felt it necessary to dig deeper in to the other SQL servers out there; PostgreSQL ended up impressing me the most.Requirements
Installation
As with almost everything on this site, installation is simple and straightforward. So, login as root or su to root.|
# # # |
cd /usr/ports/databases/postgresql7 make install clean; rehash su -l pgsql -c initdb |
Configuration
Now that the database server is installed, you probably want it to do something and be able to accept incoming connections. First, let's add a user to the database so we can actually login. As root, su to the user pgsql.| # | /usr/local/bin/createuser username |
|
# # |
cd /usr/local/pgsql/data nano -w postgresql.conf |
|
tcpip_socket = false (Change to true) port = 5432 hostname_lookup = false |
| # | nano -w pg_hba.conf |
|
host all all 127.0.0.1 255.255.255.255 trusted |
|
host all all 127.0.0.1 255.255.255.255 password passwords |
| # | /usr/local/etc/rc.d/010.pgsql.sh start |
Author: Kyle Symonds
ksymonds at gmail dot com