expand docs/arch_postgresql_nspawn.md

This commit is contained in:
Trent Palmer 2017-06-29 21:37:54 -07:00
parent 3f2df33444
commit 6dd8b8796a
4 changed files with 45 additions and 5 deletions

View File

@ -1,3 +1,24 @@
# Quick Dirty Postgresql Nspawn Container on Arch Linux
Refer to the [Nspawn](nspawn.md) page for setting up the nspawn container.
Refer to the [Nspawn](nspawn.md) page for setting up the nspawn container.
And then refer the [ArchWiki instructions](https://wiki.archlinux.org/index.php/PostgreSQL)
for postgresql.
You'll want to install postgresql, set a password for the default user `postgres`,
and then login as postgres and initilize the database.
```bash
pacman -S postgresql
# passwd for postgresql user
passwd postgres
# login as postgres
su -l postgres
# initialize the databse cluster
[postgres]$ initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data'
```
You'll need to configure `/var/lib/postgres/data/pg_hba.conf` and
`/var/lib/postgres/data/postgresql.conf` for remote access,
presumably with an identd daemon in mind. The ident daemon will
listen on port 113, not on the machine with the database server,
but it listens from the machine where is the client that remotely
wants to access the database.

View File

@ -111,7 +111,26 @@
<div class="section">
<h1 id="quick-dirty-postgresql-nspawn-container-on-arch-linux">Quick Dirty Postgresql Nspawn Container on Arch Linux</h1>
<p>Refer to the <a href="../nspawn/">Nspawn</a> page for setting up the nspawn container.</p>
<p>Refer to the <a href="../nspawn/">Nspawn</a> page for setting up the nspawn container.<br />
And then refer the <a href="https://wiki.archlinux.org/index.php/PostgreSQL">ArchWiki instructions</a>
for postgresql. </p>
<p>You'll want to install postgresql, set a password for the default user <code>postgres</code>,
and then login as postgres and initilize the database. </p>
<pre><code class="bash">pacman -S postgresql
# passwd for postgresql user
passwd postgres
# login as postgres
su -l postgres
# initialize the databse cluster
[postgres]$ initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data'
</code></pre>
<p>You'll need to configure <code>/var/lib/postgres/data/pg_hba.conf</code> and
<code>/var/lib/postgres/data/postgresql.conf</code> for remote access,
presumably with an identd daemon in mind. The ident daemon will
listen on port 113, not on the machine with the database server,
but it listens from the machine where is the client that remotely
wants to access the database.</p>
</div>
</div>

View File

@ -174,5 +174,5 @@
<!--
MkDocs version : 0.16.3
Build Date UTC : 2017-06-29 23:11:25
Build Date UTC : 2017-06-30 04:37:41
-->

View File

@ -192,12 +192,12 @@
},
{
"location": "/arch_postgresql_nspawn/",
"text": "Quick Dirty Postgresql Nspawn Container on Arch Linux\n\n\nRefer to the \nNspawn\n page for setting up the nspawn container.",
"text": "Quick Dirty Postgresql Nspawn Container on Arch Linux\n\n\nRefer to the \nNspawn\n page for setting up the nspawn container.\n\nAnd then refer the \nArchWiki instructions\n\nfor postgresql. \n\n\nYou'll want to install postgresql, set a password for the default user \npostgres\n,\nand then login as postgres and initilize the database. \n\n\npacman -S postgresql\n# passwd for postgresql user \npasswd postgres \n# login as postgres \nsu -l postgres\n# initialize the databse cluster\n[postgres]$ initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data'\n\n\n\n\nYou'll need to configure \n/var/lib/postgres/data/pg_hba.conf\n and\n\n/var/lib/postgres/data/postgresql.conf\n for remote access,\npresumably with an identd daemon in mind. The ident daemon will\nlisten on port 113, not on the machine with the database server,\nbut it listens from the machine where is the client that remotely\nwants to access the database.",
"title": "Quick Dirty Postgresql Nspawn Container on Arch Linux"
},
{
"location": "/arch_postgresql_nspawn/#quick-dirty-postgresql-nspawn-container-on-arch-linux",
"text": "Refer to the Nspawn page for setting up the nspawn container.",
"text": "Refer to the Nspawn page for setting up the nspawn container. \nAnd then refer the ArchWiki instructions \nfor postgresql. You'll want to install postgresql, set a password for the default user postgres ,\nand then login as postgres and initilize the database. pacman -S postgresql\n# passwd for postgresql user \npasswd postgres \n# login as postgres \nsu -l postgres\n# initialize the databse cluster\n[postgres]$ initdb --locale $LANG -E UTF8 -D '/var/lib/postgres/data' You'll need to configure /var/lib/postgres/data/pg_hba.conf and /var/lib/postgres/data/postgresql.conf for remote access,\npresumably with an identd daemon in mind. The ident daemon will\nlisten on port 113, not on the machine with the database server,\nbut it listens from the machine where is the client that remotely\nwants to access the database.",
"title": "Quick Dirty Postgresql Nspawn Container on Arch Linux"
}
]