(recopied from github -
https://github.com/misskey-dev/misskey/discussions/9151 - where got no reply)
os info (neofetch copy-paste):
root@hacknorris.hacknorris.com
------------------------------
OS: Slackware 15.0 x86_64 x86_64
Host: Dynabook Inc. DBIIP300
Kernel: 5.15.19
Uptime: 1 hour, 1 min
Packages: 1598 (pkgtool)
Shell: bash 5.1.16
Resolution: 1920x1080
DE: Plasma 5.23.5
WM: KWin
Theme: Breeze Light [Plasma], Breeze [GTK2/3]
Icons: [Plasma], breeze-dark [GTK2/3]
Terminal: konsole
CPU: Intel i3-8130U (4) @ 3.400GHz
GPU: Intel UHD Graphics 620
Memory: 3462MiB / 7859MiB
things done :
installed dependencies properly
downloaded misskey folder properly
setted up system users (unsure if ever properly cause adduser doesnt support flags and useradd doesnt have nopassword flag so im having probably a problem)
yarn install successful
thing NOT done and trying to do:
setup postgres
why i cant do it?
error log:
bug from stackoverflow answer (misskey folks didnt mentioned it on page):
root@hacknorris:/# su postgres -c "pg_ctl -D /var/lib/pgsql/14/data -l logfile start"
waiting for server to start..../bin/sh: line 1: logfile: Permission denied
stopped waiting
pg_ctl: could not start server
Examine the log output.
another stackoverflow thing which i got... from slackware room on matrix... o.O
root@hacknorris:/# su postgres -c "initdb -D /var/lib/pgsql/14/data --locale=en_US.UTF-8 -A md5 -W"
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
The database cluster will be initialized with locale "en_US.UTF-8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
Data page checksums are disabled.
Enter new superuser password:
Enter it again:
initdb: error: directory "/var/lib/pgsql/14/data" exists but is not empty
If you want to create a new database system, either remove or empty
the directory "/var/lib/pgsql/14/data" or run initdb
with an argument other than "/var/lib/pgsql/14/data".
your bug (idk where a bug, either in useradd/adduser or postgres itself, first try was my root password, second nothing, later left laptop with rage for few hours):
misskey@hacknorris:~$ sudo -u postgres psql
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
Password:
I feel much better now.
Password:
I've seen penguins that can type better than that.
Password:
sudo: timed out reading password
sudo: 2 incorrect password attempts
my try to reinterprete official tutorial made this :
root@hacknorris:~# su postgres
postgres@hacknorris:/root$ psql
could not change directory to "/root": Permission denied
psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory
Is the server running locally and accepting connections on that socket?
anyone ?