D
D
Dendilz2018-12-21 15:43:04
PostgreSQL
Dendilz, 2018-12-21 15:43:04

Can't set up Postgres for 1C?

I'm trying to set up a Postgresql server following instructions from the postgrespro site
apt-get update -y
apt-get install -y wget gnupg2 || apt-get install -y gnupg
wget -O - repo.postgrespro.ru/keys/GPG-KEY-POSTGRESPRO | apt-key add -
echo deb repo.postgrespro.ru/1c-archive/pg1c-10.5/ubuntu bionic main > /etc/apt/sources.list.d/postgrespro-1c.list
apt-get update -y
apt-get install -y postgrespro-1c-10-server postgrespro-1c-10-contrib
/opt/pgpro/1c-10/bin/pg-setup initdb -D /mnt/disk1/data
service postgrespro-1c-10 start

Exhaust on initialization
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 enabled.
creating directory /mnt/disk1/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
running bootstrap script ... ok
performing post-bootstrap initialization ... ok
syncing data to disk ... ok
Success. You can now start the database server using:
/opt/pgpro/1c-10/bin/pg_ctl -D /mnt/disk1/data -l logfile start
Exhaust when starting service
[email protected]:/# systemctl status postgrespro-1c-10.service
● postgrespro-1c-10.service - Postgres Pro 10 database server
Loaded: loaded (/lib/systemd/system/postgrespro-1c-10. service; disabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-12-21 12:37:29 UTC; 9min ago
Process: 13697 ExecStartPre=/opt/pgpro/1c-10/bin/check-db-dir ${PGDATA} (code=exited, status=1/FAILURE)
Dec 21 12:37:29 postgres systemd[1] : Starting Postgres Pro 10 database server...
Dec 21 12:37:29 pm postgres check-db-dir[13697]: "/var/lib/pgpro/1c-10/data" is missing or empty.
Dec 21 12:37:29 pm postgres check-db-dir[13697]: Use "/opt/pgpro/1c-10/bin/pg-setup initdb" to initialize the da
Dec 21 12:37:29 pm postgres systemd[1]: postgrespro-1c-10.service: Control process exited, code=exited status=1
Dec 21 12:37:29 pm postgres systemd[1]: postgrespro-1c-10. service: Failed with result 'exit-code'.
Dec 21 12:37:29 pm postgres systemd[1]: Failed to start Postgres Pro 10 database server.
When entering a command from the log
/opt/pgpro/1c-10/bin/pg_ctl -D /mnt/disk1/data -l logfile start
waiting for server to start..../bin/sh: 1: cannot create logfile: Permission denied
stopped waiting
pg_ctl: could not start server
Examine the log output.
it still tries to get into the default folder
at the initialization stage, if I specify another directory, the initialization goes with an error, the service does not start, tell me how to do it correctly

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
vreitech, 2018-12-21
@fzfx

/opt/pgpro/1c-10/bin/pg-setup initdbdid?

D
Dmitry Kinash, 2018-12-21
@Dementor

All answers in your question:
Compared to Windows, everything is simpler on Linux - all settings are in text files. I stopped working with Linux even before people stopped harassing systemd and abandoned System V. In those days, all the start files were in /etc/init.d. As it is now - google and then change the paths in the service startup settings. In extreme cases, you can even run a file search for the entry of the string "/var/lib/pgpro/1c-10/data".

A
Azrael33, 2018-12-24
@Azrael33

1. "/var/lib/pgpro/1c-10/data" is missing or empty. first you need to initialize (create) the database
, look towards
initdb

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question