Spaces:
Sleeping
Sleeping
Download install-postgres.sh from oonh/lmnr-test-1: direct link, hf CLI and curl.
- Browser
- Download file 553 Bytes
-
https://huggingface.co/spaces/oonh/lmnr-test-1/resolve/main/install-postgres.sh
- Command line
-
hf download hf://spaces/oonh/lmnr-test-1/install-postgres.sh
-
curl -L -o install-postgres.sh https://huggingface.co/spaces/oonh/lmnr-test-1/resolve/main/install-postgres.sh
553 Bytes
| apt-get update | |
| apt-get install -y postgresql-15 systemctl | |
| # The recommended way to init postgres on Debian is to use pg_createcluster, not initdb, | |
| # but `apt-get install postgresql-15` creates a default cluster. So we need to | |
| # drop the cluster first, then create a new one. | |
| pg_dropcluster 15 main --stop | |
| pg_createcluster -d /data/postgresql/data -l /data/postgresql/run/main.log -p 5432 15 main | |
| systemctl start postgresql | |
| su - postgres -c "psql -c \"ALTER USER postgres WITH PASSWORD 'postgres_passwordabc';\"" | |
| systemctl enable postgresql | |