http://archives.postgresql.org/pgsql-admin/2005-07/msg00166.php I (believe) the correct solution for postgres on gentoo linux is: mkdir /var/lib/postgresql chown postgres /var/lib/postgresql su postgres -c "initdb -D /var/lib/postgresql/data/" ls /var/lib/postgresql/data/ /etc/init.d/postgresql start history