Postgresql.vm.nurd.space: Difference between revisions

From NURDspace
No edit summary
No edit summary
 
Line 8: Line 8:
}}
}}
== What ==
== What ==
This is a [http://www.postgresql.org PostgreSQL] server.
This is a [http://www.postgresql.org PostgreSQL] server.
For documentation refer to [http://www.postgresql.org/docs/9.1/interactive/index.html]
For documentation refer to [http://www.postgresql.org/docs/9.1/interactive/index.html]
 
It uses apt repo from postgres: [https://www.postgresql.org/download/linux/debian/].
== Shit is broken yo ==
This container is currently very unhappy.
After boot, you have to manually start networking and postgres.
 
<pre>
service postgresql start
service networking start
</pre>


== Versions ==
== Versions ==
* 9.1 on port 5432 (used)
* 9.1 on port 5432 (used)
* 9.4 on port 5433 (currently unused)
* 9.6 on port 9434 (currently unused)
== Documentation ==
This machine has ldap authentication enabled.
Just a few pointers about creating databases and authentication:
If you are logged in on the shell of a postgres machine, postgresql normally uses [http://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-IDENT Ident authentication]. This means that starting using postgresql command-line tools, logs you in as the postgresql user with the same name as your shell user.
To log in to the postgresql command-line tool with the postgresql equivalent of the root user (called postgres), execute
sudo -u postgres psql
By default you log-in to the database with the same name as your username. To log-in to a different database do:
sudo -u postgres psql -d <dbname>
Databases and users can be created with normal command-line tools. To create a user and database owned by it, do:
sudo -u postgres createuser -P <username>
sudo -u postgres createdb -U UTF8 -T template0 -O <username> <username>


It is best to create databases with the same name as the owner. This is due to [http://www.postgresql.org/docs/current/static/auth-pg-hba-conf.html pg_hba.conf]. This file (in /etc/postgres/<version>/main/), defines which user is allowed to log-in to which database, from which host and with which method.
== Used for ==
By default, postgres allows the postgres user to log into any database, and users only from localhost into databases with the same name as their username when password authentication is used.
* [[Parts|Partkeepr]]


If you need username/password authentication from other hosts, add a line to pg_hba.conf, allowing it.
== Todo ==
* Migrate to newer postgres version

Latest revision as of 02:03, 30 January 2022

NURDs Inventory
PostgreSQL.png
Owner Space
Status Infrastructure
Hostname postgresql.vm.nurd.space
Location Coherence
Tool No
Tool category

{{{Name}}}Property "Tool Name" (as page type) with input value "{{{Name}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process.

PostgreSQL.png {{{InventoryOwner}}}Property "Tool Owner" (as page type) with input value "{{{InventoryOwner}}}" contains invalid characters or is incomplete and therefore can cause unexpected results during a query or annotation process. Coherence

What

This is a PostgreSQL server. For documentation refer to [1] It uses apt repo from postgres: [2].

Versions

  • 9.1 on port 5432 (used)

Used for

Todo

  • Migrate to newer postgres version