add redis database documentation
This commit is contained in:
parent
85a968ad40
commit
3821562cf6
@ -1,28 +1,5 @@
|
|||||||
|
You have 2 choices for database backend:
|
||||||
|
|
||||||
Postgres on Debian (as root)
|
* [postgres](postgres.md)
|
||||||
|
|
||||||
# install as root
|
* [redis](redis.md)
|
||||||
apt-get install --no-install-recommends postgresql postgresql-client
|
|
||||||
|
|
||||||
|
|
||||||
Setting up postgres (as root)
|
|
||||||
|
|
||||||
# become postgres user
|
|
||||||
su postgres
|
|
||||||
# spawn postgres admin shell
|
|
||||||
psql
|
|
||||||
|
|
||||||
You'll get a prompt, enter the following:
|
|
||||||
|
|
||||||
CREATE ROLE srnd WITH LOGIN PASSWORD 'srnd';
|
|
||||||
CREATE DATABASE srnd WITH ENCODING 'UTF8' OWNER srnd;
|
|
||||||
\q
|
|
||||||
|
|
||||||
For demo purposes we'll use these credentials.
|
|
||||||
These are default values, please change them later.
|
|
||||||
|
|
||||||
## important
|
|
||||||
|
|
||||||
these credentials assume you are going to run using a user called `srnd`, if your username you plan to run the daemon as is different please change `srnd` to your username.
|
|
||||||
|
|
||||||
Now run it, [next](running.md)
|
|
||||||
|
28
doc/postgres.md
Normal file
28
doc/postgres.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
Postgres on Debian (as root)
|
||||||
|
|
||||||
|
# install as root
|
||||||
|
apt-get install --no-install-recommends postgresql postgresql-client
|
||||||
|
|
||||||
|
|
||||||
|
Setting up postgres (as root)
|
||||||
|
|
||||||
|
# become postgres user
|
||||||
|
su postgres
|
||||||
|
# spawn postgres admin shell
|
||||||
|
psql
|
||||||
|
|
||||||
|
You'll get a prompt, enter the following:
|
||||||
|
|
||||||
|
CREATE ROLE srnd WITH LOGIN PASSWORD 'srnd';
|
||||||
|
CREATE DATABASE srnd WITH ENCODING 'UTF8' OWNER srnd;
|
||||||
|
\q
|
||||||
|
|
||||||
|
For demo purposes we'll use these credentials.
|
||||||
|
These are default values, please change them later.
|
||||||
|
|
||||||
|
## important
|
||||||
|
|
||||||
|
these credentials assume you are going to run using a user called `srnd`, if your username you plan to run the daemon as is different please change `srnd` to your username.
|
||||||
|
|
||||||
|
Now run it, [next](running.md)
|
35
doc/redis.md
Normal file
35
doc/redis.md
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# configuring redis database backend
|
||||||
|
|
||||||
|
|
||||||
|
0) Install redis
|
||||||
|
|
||||||
|
0.A) debian/ubuntu
|
||||||
|
|
||||||
|
# apt update
|
||||||
|
# apt install redis-server
|
||||||
|
|
||||||
|
0.B) redhat
|
||||||
|
|
||||||
|
# yum install redis
|
||||||
|
|
||||||
|
0.C) from source
|
||||||
|
|
||||||
|
* see http://redis.io/download
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
1) Configuration
|
||||||
|
|
||||||
|
In srnd.ini the database sections should look like this:
|
||||||
|
|
||||||
|
[database]
|
||||||
|
type=redis
|
||||||
|
schema=single
|
||||||
|
host=localhost
|
||||||
|
port=6379
|
||||||
|
user=
|
||||||
|
password=
|
||||||
|
|
||||||
|
2) Run the daemon
|
||||||
|
|
||||||
|
* see the [next step](running.md)
|
Reference in New Issue
Block a user