It quite simple only with a few small surprises.
- pgAdmin you can install directly from AppCafe
- onmyPcBSD PostgreSQL was notpartofAppCafe so I have to use manual install:
- as root: pkg install postgresql93-server
- output from installation will show you:
- to start PostgreSQL automatically on startup add new line ‘postgresql_enable=”YES”‘ into /etc/rc.conf
- to initialize db run as root command: /usr/local/etc/rc.d/postgresql initdb
- to start db run as pgsql command: /usr/local/etc/rc.d/postgresql start
- small surprise is that server is running under user pgsql
- and second surprise is that database does not have after installation default user “postgres” as usual but “pgsql” and without password – so to connect in pgAdmin you have to use pgsql
But otherwise everything else is “as usual” and you can start to work.
- Look here how to see postgresql processes on PcBSC.
- To connect to psql use this command under pgsql OS user: psql postgres -U pgsql