From LedHed's Wiki
(Created page with ' == FreeBSD == pkg_add -r postgresql82-server The package creates a 'pgsql' user account. Change to that user to finish the installation: su -m pgsql Initialise the database:...') |
(→FreeBSD) |
||
(2 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
== FreeBSD == | == FreeBSD == | ||
pkg_add -r postgresql82-server | pkg_add -r postgresql82-server | ||
+ | |||
The package creates a 'pgsql' user account. | The package creates a 'pgsql' user account. | ||
Line 7: | Line 8: | ||
su -m pgsql | su -m pgsql | ||
− | + | ||
+ | Initialize the database: | ||
/usr/local/bin/initdb /usr/local/pgsql/data | /usr/local/bin/initdb /usr/local/pgsql/data | ||
+ | |||
Create a user: | Create a user: | ||
/usr/local/bin/createuser USERNAME | /usr/local/bin/createuser USERNAME | ||
+ | |||
Log out of the 'pgsql' user account by pressing | Log out of the 'pgsql' user account by pressing | ||
Line 17: | Line 21: | ||
or | or | ||
lo | lo | ||
+ | |||
At this point the PostgreSQL daemon can be started. | At this point the PostgreSQL daemon can be started. | ||
/usr/local/etc/rc.d/postgresql start | /usr/local/etc/rc.d/postgresql start | ||
+ | |||
+ | To have PostgreSQL start automatically with FreeBSD you need to add this line to /etc/rc.conf | ||
+ | postgresql_enable="YES" | ||
== References == | == References == |
Latest revision as of 08:16, 4 June 2009
FreeBSD
pkg_add -r postgresql82-server
The package creates a 'pgsql' user account.
Change to that user to finish the installation:
su -m pgsql
Initialize the database:
/usr/local/bin/initdb /usr/local/pgsql/data
Create a user:
/usr/local/bin/createuser USERNAME
Log out of the 'pgsql' user account by pressing
[CRTL]+d
or
lo
At this point the PostgreSQL daemon can be started.
/usr/local/etc/rc.d/postgresql start
To have PostgreSQL start automatically with FreeBSD you need to add this line to /etc/rc.conf
postgresql_enable="YES"