-
Notifications
You must be signed in to change notification settings - Fork 2
Befriend QColdsweat with a PostgreSQL database
WORK UNDER PROGRESS:
Consider this page only a draft for now. Don't take it too seriously.
https://www.postgresql.org/docs/9.6/static/sql-createdatabase.html
https://www.postgresql.org/docs/9.6/static/app-createuser.html
https://www.postgresql.org/docs/9.6/static/bookindex.html
http://stackoverflow.com/questions/1471571/how-to-configure-postgresql-for-the-first-time
http://stackoverflow.com/questions/2172569/how-do-i-login-and-authenticate-to-postgresql-after-a-fresh-install
https://www.adminer.org/
https://github.com/vrana/adminer/
Coldsweat uses the psycopg2 python module to communicate with PostgreSQL and at the time of writing, its compatibility is:
- Python 2 versions from 2.6 to 2.7
- Python 3 versions from 3.2 to 3.6
- PostgreSQL server versions from 7.4 to 9.6
- PostgreSQL client library version from 9.1
This means that psycopg2 v2.7.1 supports PostgreSQL v9.6.x and therefore, QColdsweat supports PostgreSQL v9.6.x. At the time of writing, you could use one of the following QPKGs:
- App Center (depending on QTS and your NAS model): PostgreSQL v9.6.0.1.
- App Center (depending on QTS and your NAS model): PostgreSQL v9.3.4.2.
- QNAP forum (non-ARM machines): PostgreSQL v9.5.4.
All of those should be supported :).
See the README.
As denoted above.
- SSH into your QNAP.
- Execute
/sbin/getcfg "QColdsweat" "Install_Path" -f "/etc/config/qpkg.conf"
.- This will output the folder where QColdsweat has been installed.
- Navigate to the parent folder of the folder returned in step 2.
- From there, navigate to the sub-folder where PostgreSQL has been installed.
- Should be something like
./PostgreSQL96
.
- Should be something like
- Execute:
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$(pwd)/lib"
export PATH="$PATH:$(pwd)/bin"
pip install psycopg2
WORK UNDER PROGRESS:
I haven't succeeded in getting through yet, feel free to try yourself :). Guide:
https://www.postgresql.org/docs/9.6/static/server-start.html
Eventually, we'll have to change Coldsweat's config, like this.