1 (edited by lostinignorance 2022-08-02 08:25:33)

Topic: Ubuntu install postgre 12 and 14? [Solved]

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.0
- Deployed with iRedMail Easy or the downloadable installer? Download
- Linux/BSD distribution name and version: Ubuntu server 20.04.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

This is a fresh install. During the initial install, postgresql 12 is installed yet 14 is configured at the end?

Unpacking postgresql-client-common (214ubuntu0.1) ...
Selecting previously unselected package postgresql-client-12.
Preparing to unpack .../230-postgresql-client-12_12.11-0ubuntu0.20.04.1_amd64.de                                                                                                                                                             b ...
Unpacking postgresql-client-12 (12.11-0ubuntu0.20.04.1) ...
Selecting previously unselected package postgresql-common.
Preparing to unpack .../231-postgresql-common_214ubuntu0.1_all.deb ...
Adding 'diversion of /usr/bin/pg_config to /usr/bin/pg_config.libpq-dev by postg                                                                                                                                                             resql-common'
Unpacking postgresql-common (214ubuntu0.1) ...
Selecting previously unselected package postgresql-12.
Preparing to unpack .../232-postgresql-12_12.11-0ubuntu0.20.04.1_amd64.deb ...
Unpacking postgresql-12 (12.11-0ubuntu0.20.04.1) ...
Selecting previously unselected package postgresql.
Preparing to unpack .../233-postgresql_12+214ubuntu0.1_all.deb ...
Unpacking postgresql (12+214ubuntu0.1) ...
Selecting previously unselected package postgresql-client.
Preparing to unpack .../234-postgresql-client_12+214ubuntu0.1_all.deb ...
Unpacking postgresql-client (12+214ubuntu0.1) ...
Selecting previously unselected package postgresql-contrib.
Preparing to unpack .../235-postgresql-contrib_12+214ubuntu0.1_all.deb ...
Unpacking postgresql-contrib (12+214ubuntu0.1) ...
********************************************************************
* Start iRedMail Configurations
********************************************************************
[ INFO ] Generate self-signed SSL cert (4096 bits, expire in 10 years).
[ INFO ] Generate Diffie Hellman Group with openssl, please wait.
[ INFO ] Create required system accounts.
[ INFO ] Configure PostgreSQL database server.
Can't open /etc/postgresql/14/main/pg_hba.conf: No such file or directory.
Can't open /etc/postgresql/14/main/pg_hba.conf: No such file or directory.
/root/iRedMail-1.6.0/functions/postgresql.sh: line 92: /etc/postgresql/14/main/p                                                                                                                                                             g_hba.conf: No such file or directory
/root/iRedMail-1.6.0/functions/postgresql.sh: line 93: /etc/postgresql/14/main/p                                                                                                                                                             g_hba.conf: No such file or directory
/root/iRedMail-1.6.0/functions/postgresql.sh: line 94: /etc/postgresql/14/main/p                                                                                                                                                             g_hba.conf: No such file or directory
cp: cannot create regular file '/var/lib/postgresql/14/main/': No such file or d                                                                                                                                                             irectory
cp: cannot create regular file '/var/lib/postgresql/14/main/iredmail.sql': No su                                                                                                                                                             ch file or directory
cp: cannot create regular file '/var/lib/postgresql/14/main/': No such file or d                                                                                                                                                             irectory
cp: cannot create regular file '/var/lib/postgresql/14/main/': No such file or d                                                                                                                                                             irectory
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/*.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/iredmail.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/iredmail.sql: No such file or directory.
Can't open /var/lib/postgresql/14/main/iredmail.sql: No such file or directory.
chmod: cannot access '/var/lib/postgresql/14/main/*sql': No such file or directo                                                                                                                                                             ry
mv: cannot stat '/var/lib/postgresql/14/main/*sql': No such file or directory
chmod: cannot access '/root/iRedMail-1.6.0/runtime/*sql': No such file or direct                                                                                                                                                             ory
[ INFO ] Setup daily cron job to backup PostgreSQL databases with /var/vmail/bac                                                                                                                                                             kup/backup_pgsql.sh
[ INFO ] Configure Postfix (MTA).
[ INFO ] Configure Dovecot (POP3/IMAP/Managesieve/LMTP/LDA).
[ INFO ] Configure Nginx web server.
[ INFO ] Configure PHP.
[ INFO ] Configure mlmmj (mailing list manager).
[ INFO ] Configure ClamAV (anti-virus toolkit).
[ INFO ] Configure Amavisd-new (interface between MTA and content checkers).
[ INFO ] Configure SpamAssassin (content-based spam filter).
[ INFO ] Configure iRedAPD (postfix policy daemon).
chmod: cannot access '/var/lib/postgresql/14/main/tmp/*sql': No such file or dir                                                                                                                                                             ectory
[ INFO ] Configure iRedAdmin (official web-based admin panel).
cp: cannot create regular file '/var/lib/postgresql/14/main/': No such file or d                                                                                                                                                             irectory
chmod: cannot access '/var/lib/postgresql/14/main/iredadmin.pgsql': No such file                                                                                                                                                              or directory
[ INFO ] Configure Roundcube webmail.
[ INFO ] Configure SOGo Groupware (Webmail, Calendar, Address Book, ActiveSync).
/root/iRedMail-1.6.0/functions/sogo.sh: line 65: /var/lib/postgresql/14/main/cre                                                                                                                                                             ate_db.sql: No such file or directory
/root/iRedMail-1.6.0/functions/sogo.sh: line 73: /var/lib/postgresql/14/main/cre                                                                                                                                                             ate_db.sql: No such file or directory
[ INFO ] Configure Fail2ban (authentication failure monitor).
psql: error: FATAL:  Peer authentication failed for user "fail2ban"
[ INFO ] Configure netdata (system and application monitor).

*************************************************************************
* iRedMail-1.6.0 installation and configuration complete.
*************************************************************************

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Stable release is out.

2

Re: Ubuntu install postgre 12 and 14? [Solved]

the package is called postgresql, and has version 12 on ubuntu server, but version 14 on latest release since 30. September 2021

so the setup fails on ubuntu server

3

Re: Ubuntu install postgre 12 and 14? [Solved]

Cthulhu wrote:

the package is called postgresql, and has version 12 on ubuntu server, but version 14 on latest release since 30. September 2021

so the setup fails on ubuntu server

So does that mean this is a know issue or a bug?

4 (edited by Cthulhu 2022-08-01 10:40:58)

Re: Ubuntu install postgre 12 and 14? [Solved]

neither, but ubuntu server is not listed on supported systems aswell

you can change to mysql, this should work, or modify the installer script and the default sources for pgserver on ubunto server so postgres refers to verson 14 instead of 12, but running on a non supported system will lead to problems with problem solving

5

Re: Ubuntu install postgre 12 and 14? [Solved]

This is a bug of iRedMail-1.6.0. Please apply this fix before launching iRedMail installer:
https://github.com/iredmail/iRedMail/co … e7664cd0d5

6

Re: Ubuntu install postgre 12 and 14? [Solved]

ZhangHuangbin wrote:

This is a bug of iRedMail-1.6.0. Please apply this fix before launching iRedMail installer:
https://github.com/iredmail/iRedMail/co … e7664cd0d5

Zhang, thank you. That fixed the issue.

7

Re: Ubuntu install postgre 12 and 14? [Solved]

Is there a way to fix this post-installation, or does this fix have to be applied to the source code and installation re-run if a mail server has already been setup?

8

Re: Ubuntu install postgre 12 and 14? [Solved]

matt.harrop wrote:

Is there a way to fix this post-installation, or does this fix have to be applied to the source code and installation re-run if a mail server has already been setup?

This affects iRedMail installation, not post-installation.