LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 11-09-2022, 12:31 PM   #1
hacknorris
LQ Newbie
 
Registered: Nov 2022
Distribution: slackware 15
Posts: 8

Rep: Reputation: 0
Question trying to install misskey server under slacky... postgres broken along with users annd sudo/su :/


(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 ?
 
Old 11-11-2022, 05:47 PM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
How did you install postgresql, with slackbuild.org?

There are some instructions to follow:
https://slackbuilds.org/repository/1...em/postgresql/
and:
https://slackbuilds.org/slackbuilds/...sql/README.SBo
 
1 members found this post helpful.
Old 11-12-2022, 06:08 AM   #3
henca
Member
 
Registered: Aug 2007
Location: Linköping, Sweden
Distribution: Slackware
Posts: 995

Rep: Reputation: 675Reputation: 675Reputation: 675Reputation: 675Reputation: 675Reputation: 675
Looking at the instructions that keefaz linked to, the key to note seems to be:

Quote:
Before you can run postgresql you'll need to create the
database files in /var/lib/pgsql. The following should do
the trick.
# su postgres -c "initdb -D /var/lib/pgsql/14/data --locale=en_US.UTF-8 -A md5 -W"
In your description you first started postgresql with:
Code:
su postgres -c "pg_ctl -D /var/lib/pgsql/14/data -l logfile start"
and then failed to create the database.

I have no experience from postgres, but if I would guess, I would try the follwing:

1) stop the database
2) clean up the database (remove /var/lib/pgsql/14/data as instructed in the error message)
3) create the database as instructed in README.SBo and on stackoverflow
4) Try to start the database again, better with "/etc/rc.d/rc.postgresql start" than with your su command.
5) Read the README.SBo on how to get postgres to start at each reboot.

regards Henrik
 
1 members found this post helpful.
Old 11-12-2022, 06:31 AM   #4
hacknorris
LQ Newbie
 
Registered: Nov 2022
Distribution: slackware 15
Posts: 8

Original Poster
Rep: Reputation: 0
already i fixed this before mods approved. i just was messing up too much.
 
Old 11-12-2022, 06:32 AM   #5
hacknorris
LQ Newbie
 
Registered: Nov 2022
Distribution: slackware 15
Posts: 8

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by keefaz View Post
How did you install postgresql, with slackbuild.org?

There are some instructions to follow:
https://slackbuilds.org/repository/1...em/postgresql/
and:
https://slackbuilds.org/slackbuilds/...sql/README.SBo
yep, exactly, same as all other packs
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: EnterpriseDB's EDB Postgres Advanced Server and EDB Postgres Enterprise Manager LXer Syndicated Linux News 0 04-28-2016 03:41 AM
[SOLVED] Postgres 9.4 + unixODBC on Centos 6.5 problem connecting localhost postgres instance with ODBC isql rylan76 Linux - Server 1 07-22-2015 05:39 AM
Changes in postgres without restarting postgres venki Linux - General 3 07-19-2007 01:06 AM
Problem with the slacky 9.1 install sgfx Slackware - Installation 3 06-15-2004 03:38 PM
Slacky 9.0 is broken! Grim Reaper Linux - Software 3 03-29-2003 09:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration