1

Topic: No database install or install second server to use already existing

==== Required information ====
- iRedMail version (check /etc/iredmail-release): iRedMail-0.9.5-1
- Linux/BSD distribution name and version: Ubuntu 14.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? NO
- Related log if you're reporting an issue:
====

Hello all,
I am trying to make my AWS HA install. I will use EFS as shared file system and ELB as front end load balancer.
Is there a way to make the install with no DB. I already installed server 1 to use MariaDB RDS as database backend.
Best regards, Traian.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: No database install or install second server to use already existing

The latest stable release, iRedMail-0.9.5-1, doesn't support this. But the latest development edition of iRedMail supports this with installation argument "INITIALIZE_SQL_DATA=NO", then it will:

- not install a local mysql server. but mysql client package is still required to connect to sql server.

- not create any SQL database/table/record, just update config file with the SQL username/password defined in iRedMail config file ('config' under iRedMail-0.9.x), or specified as installation argument.

Sample command used to launch iRedMail installer:

USE_EXISTING_MYSQL='YES' \
    INITIALIZE_SQL_DATA='NO' \
    MYSQL_SERVER_ADDRESS='<sql_server_address>' \
    MYSQL_SERVER_PORT='3306' \
    MYSQL_ROOT_USER='root' \
    MYSQL_ROOT_PASSWD='secret' \
    AMAVISD_DB_PASSWD='gb4NYuw7qUs5IS7hlptRqPqTPvjXP1Dt' \
    IREDADMIN_DB_PASSWD='tMQUtkrxiP3KTpxxmLd8SFFILAHQEhR7' \
    RCM_DB_PASSWD='QodUrRcxpB5OSZaHFkfnH74FMq0dX2W7' \
    SOGO_DB_PASSWD='cqVsTAlR1DXGEb8DyH4RiM0z5sLMwQfd' \
    SOGO_SIEVE_MASTER_PASSWD='gRL3XhBZagJBzwkLr5FOoiWoWznMqOIj' \
    IREDAPD_DB_PASSWD='LSaGHUdFE1cIagwoowLytsI4NyhP6RVi' \
    bash iRedMail.sh

The first 3 parameters must be specified on command line (USE_EXISTING_MYSQL, INITIALIZE_SQL_DATA, MYSQL_SERVER_ADDRESS), others can be defined in iRedMail 'config' file (you can copy this file from first server, but replace mysql server related settings).

You can give it a try, if it doesn't work, please let me know, so that we can get a working stable iRedMail release.

3

Re: No database install or install second server to use already existing

By the way, would you mind sharing your HA + iRedMail architecture and detailed setup?

4

Re: No database install or install second server to use already existing

Hello,

As soon as I get it up and running I will.
By the way there are some error when installing SOGo on Ubuntu 14.04 LTS.

5

Re: No database install or install second server to use already existing

ZhangHuangbin wrote:

The latest stable release, iRedMail-0.9.5-1, doesn't support this. But the latest development edition of iRedMail supports this with installation argument "INITIALIZE_SQL_DATA=NO", then it will:

- not install a local mysql server. but mysql client package is still required to connect to sql server.

- not create any SQL database/table/record, just update config file with the SQL username/password defined in iRedMail config file ('config' under iRedMail-0.9.x), or specified as installation argument.

Sample command used to launch iRedMail installer:

USE_EXISTING_MYSQL='YES' \
    INITIALIZE_SQL_DATA='NO' \
    MYSQL_SERVER_ADDRESS='<sql_server_address>' \
    MYSQL_SERVER_PORT='3306' \
    MYSQL_ROOT_USER='root' \
    MYSQL_ROOT_PASSWD='secret' \
    AMAVISD_DB_PASSWD='gb4NYuw7qUs5IS7hlptRqPqTPvjXP1Dt' \
    IREDADMIN_DB_PASSWD='tMQUtkrxiP3KTpxxmLd8SFFILAHQEhR7' \
    RCM_DB_PASSWD='QodUrRcxpB5OSZaHFkfnH74FMq0dX2W7' \
    SOGO_DB_PASSWD='cqVsTAlR1DXGEb8DyH4RiM0z5sLMwQfd' \
    SOGO_SIEVE_MASTER_PASSWD='gRL3XhBZagJBzwkLr5FOoiWoWznMqOIj' \
    IREDAPD_DB_PASSWD='LSaGHUdFE1cIagwoowLytsI4NyhP6RVi' \
    bash iRedMail.sh

The first 3 parameters must be specified on command line (USE_EXISTING_MYSQL, INITIALIZE_SQL_DATA, MYSQL_SERVER_ADDRESS), others can be defined in iRedMail 'config' file (you can copy this file from first server, but replace mysql server related settings).

You can give it a try, if it doesn't work, please let me know, so that we can get a working stable iRedMail release.

Can you please tell when I can get the DEV version?

6

Re: No database install or install second server to use already existing

Got the first server up and running. ELB already forwarding the ports. Will have to get a certificate and test the SSL termination on the ELB part.
Also in plan is not to get the MX backend servers directly connected to the internet.
Will continue tomorrow because last night I slept only 3 hours.

7

Re: No database install or install second server to use already existing

LordZ wrote:

By the way there are some error when installing SOGo on Ubuntu 14.04 LTS.

Then please show me the error message.

LordZ wrote:

Can you please tell when I can get the DEV version?

You can clone it from our source code repo:
https://bitbucket.org/zhb/iredmail

8

Re: No database install or install second server to use already existing

ZhangHuangbin wrote:
LordZ wrote:

By the way there are some error when installing SOGo on Ubuntu 14.04 LTS.

Then please show me the error message.

LordZ wrote:

Can you please tell when I can get the DEV version?

You can clone it from our source code repo:
https://bitbucket.org/zhb/iredmail

I already figured it out myself to clone the code.
I will start the install and post the errors here.

9

Re: No database install or install second server to use already existing

Thread closed. Please create a new topic for further issues, and good luck. smile

10

Re: No database install or install second server to use already existing

Please do not close topic. I will post here if the info you shared above works.

11

Re: No database install or install second server to use already existing

Had to manually fix the MySQL grants for IP of second machine.
In initial script here http://www.iredmail.org/docs/install.ir … erver.html
I guess to fix it you need in MYSQL_GRANT_HOST section to put '%' to not fix the grants manualy after.

12

Re: No database install or install second server to use already existing

MYSQL_GRANT_HOST='<ip>' is used to grant access from <ip>. May i know what your purpose is?

13

Re: No database install or install second server to use already existing

When installing first server i ran the
MYSQL_SERVER_ADDRESS='192.168.1.100' MYSQL_SERVER_PORT='3306' MYSQL_ROOT_USER='admin_iredmail'   MYSQL_ROOT_PASSWD='admin_password' MYSQL_GRANT_HOST='192.168.1.200' bash iRedMail.sh

after installing on second server I had the issue of connecting from it to MySQL remote server so I proposed that when installing first time on primary server to use MYSQL_GRANT_HOST='%'  so not having to do manual GRANT to the IP of second server.

14

Re: No database install or install second server to use already existing

Wait. Do you use remote MySQL server (on third server) on both first/second servers?

15

Re: No database install or install second server to use already existing

By the way, we're working on clustering support too, the latest iRedMail development edition may be updated frequently. You can check our commit log first.

16

Re: No database install or install second server to use already existing

Thnx Zhang Huangbin.