|
|
|
|
|
by thewhitetulip
3838 days ago
|
|
I am using elementary OS and I have installed it many times, can you give me a good tutorial about installing and configuring postgres? I want to use it with golang for development of webapps. I am not trolling here btw, I am really stuck with sqlite because of inability of installing postgrest :( |
|
* If I wanted to make Postgres listen on non-localhost, modify listen_addresses in postgresql.conf.
* Add database access controls as required in pg_hba.conf. The comments in the file are illuminating, but one can examine [0] for more information. [1]
* Create a database with appropriate permissions, along with a user. [2]
* Start Postgres.
I remember having to do the equivalent of all of those things every time I had to install MySQL. :)
What -exactly- did you successfully do, what -exactly- did you fail to do? Divulging that information will help guide assistance efforts. :)
[0] http://www.postgresql.org/docs/9.4/static/auth-pg-hba-conf.h...
[1] For example, the following line would allow password-based access from IPv4 localhost by the user "user" to the database "database":
[2] http://www.postgresql.org/docs/9.4/static/sql-createdatabase... for CREATE DATABASE syntax (or you can use createdb http://www.postgresql.org/docs/9.4/static/app-createdb.html ) http://www.postgresql.org/docs/9.4/static/sql-createrole.htm... for CREATE ROLE syntax (or you can use http://www.postgresql.org/docs/9.4/static/app-createuser.htm... ) http://www.postgresql.org/docs/9.4/static/sql-grant.html for GRANT syntax.