How to install Postgresql in proot-distro?
ask9027 opened this issue · 3 comments
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.
??
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
And sorry for the late response I was on a vacation ✌️
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 --startConnect to cluster with default db postgres
psql -d postgresThat should work
And sorry for the late response I was on a vacation ✌️
Your Late response is very helpfull and usefull 👌