I am working off the following:
http://www.howtoforge.com/opennms_network_management
I'm at the point where I am supposed to initialize postgres database
$bin/initdb -D data/
Output:
initdb: cannot be run as root
Please log in (using, e.g., "su") as the (unprivileged) user that will
own the server process.
When I log in as su postgres and run the command I get:
initdb -D data/
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale en_US.UTF-8.
The default database encoding has accordingly been set to UTF8.
creating directory data ... initdb: could not create directory "data": Permission denied
Is the best way to assign user postgres the server process? If so where is it?
Thanks!