Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install Postgresql in proot-distro? #200

Closed
ask9027 opened this issue Oct 17, 2022 · 3 comments
Closed

How to install Postgresql in proot-distro? #200

ask9027 opened this issue Oct 17, 2022 · 3 comments
Labels
documentation Improvements or additions to documentation question Further information is requested

Comments

@ask9027
Copy link

ask9027 commented Oct 17, 2022

Recently i installed Postgresql in ubuntu(Termux) but fail to start server.
Please help me setup postgresql in ubuntu(Termux).
i know there is postgresql package in termux repo but it has limitations.

@ask9027 ask9027 added documentation Improvements or additions to documentation question Further information is requested labels Oct 17, 2022
@ask9027
Copy link
Author

ask9027 commented Oct 24, 2022

??

@SaicharanKandukuri
Copy link
Member

Looks like postgresql have some issues with proot ( it won't work properly in root cause of I'd 0 hack in proot )

But it's just with the root user having a lot of trouble.

After some workarounds I managed to start and login posgres cluster SQL

Here is what you can do

Login to a non-root user ( ex: udroid its udroid de build )

read this for creating your own non-root users in proot environments: udroid_wiki/non-root-users

Then chown the ssh key for current user

chown $USER:$USER "/etc/ssl/private/ssl-cert-snakeoil.key"

Create a cluster

pg_createcluster 14 main --start

Connect to cluster with default db postgres

psql -d postgres

That should work

Screenshot_20221024-214607_Termux.jpg
Screenshot_20221024-222814_Termux.jpg

And sorry for the late response I was on a vacation ✌️

@ask9027
Copy link
Author

ask9027 commented Oct 25, 2022

Looks like postgresql have some issues with proot ( it won't work properly in root cause of I'd 0 hack in proot )

But it's just with the root user having a lot of trouble.

After some workarounds I managed to start and login posgres cluster SQL

Here is what you can do

Login to a non-root user ( ex: udroid its udroid de build )

read this for creating your own non-root users in proot environments: udroid_wiki/non-root-users

Then chown the ssh key for current user

chown $USER:$USER "/etc/ssl/private/ssl-cert-snakeoil.key"

Create a cluster

pg_createcluster 14 main --start

Connect to cluster with default db postgres

psql -d postgres

That should work

Screenshot_20221024-214607_Termux.jpg Screenshot_20221024-222814_Termux.jpg

And sorry for the late response I was on a vacation ✌️

Your Late response is very helpfull and usefull 👌

@ask9027 ask9027 closed this as completed Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants