@ -13,12 +13,11 @@ Ensure the FQDN of the server is correctly set. You can find the hostname confi
|
|||||||
## Disable SELinux
|
## Disable SELinux
|
||||||
iRedMail doesn't work with SELinux, so please disable it by setting below value in its config file /etc/selinux/config. After server reboot, SELinux will be completely disabled.
|
iRedMail doesn't work with SELinux, so please disable it by setting below value in its config file /etc/selinux/config. After server reboot, SELinux will be completely disabled.
|
||||||
``` sh
|
``` sh
|
||||||
sudo sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config
|
sudo sed -i 's/^SELINUX=.*/SELINUX=disabled/' /etc/selinux/config # (1)
|
||||||
sudo setenforce 0
|
sudo setenforce 0
|
||||||
```
|
```
|
||||||
|
|
||||||
!!! note
|
1. If you prefer to let SELinux prints warnings instead of enforcing, you can set this value instead: `SELINUX=permissive`
|
||||||
If you prefer to let SELinux prints warnings instead of enforcing, you can set this value instead: `SELINUX=permissive`
|
|
||||||
|
|
||||||
## Set Domain and iRedMail Version
|
## Set Domain and iRedMail Version
|
||||||
Start by connecting to the server / VM via SSH, then set silent deployment variables below.
|
Start by connecting to the server / VM via SSH, then set silent deployment variables below.
|
||||||
@ -27,8 +26,8 @@ Start by connecting to the server / VM via SSH, then set silent deployment varia
|
|||||||
sudo su
|
sudo su
|
||||||
|
|
||||||
# Define some deployment variables.
|
# Define some deployment variables.
|
||||||
VERSION="1.6.8"
|
VERSION="1.6.8" # (1)
|
||||||
MAIL_DOMAIN="bunny-lab.io"
|
MAIL_DOMAIN="bunny-lab.io" # (2)
|
||||||
```
|
```
|
||||||
|
|
||||||
1. This is the version of iRedMail you are deploying. You can find the newest version on the [iRedMail Download Page](https://www.iredmail.org/download.html).
|
1. This is the version of iRedMail you are deploying. You can find the newest version on the [iRedMail Download Page](https://www.iredmail.org/download.html).
|
||||||
@ -55,18 +54,25 @@ tar zxf iRedMail-$VERSION.tar.gz
|
|||||||
(echo "export STORAGE_BASE_DIR='/var/vmail'"; echo "export WEB_SERVER='NGINX'"; echo "export BACKEND_ORIG='PGSQL'"; echo "export BACKEND='PGSQL'"; for var in VMAIL_DB_BIND_PASSWD VMAIL_DB_ADMIN_PASSWD MLMMJADMIN_API_AUTH_TOKEN NETDATA_DB_PASSWD AMAVISD_DB_PASSWD IREDADMIN_DB_PASSWD RCM_DB_PASSWD SOGO_DB_PASSWD SOGO_SIEVE_MASTER_PASSWD IREDAPD_DB_PASSWD FAIL2BAN_DB_PASSWD PGSQL_ROOT_PASSWD DOMAIN_ADMIN_PASSWD_PLAIN; do echo "export $var='$(openssl rand -base64 48 | tr -d '+/=' | head -c 32)'"; done; echo "export FIRST_DOMAIN='$MAIL_DOMAIN'"; echo "export USE_IREDADMIN='YES'"; echo "export USE_SOGO='YES'"; echo "export USE_NETDATA='YES'"; echo "export USE_FAIL2BAN='YES'") > /root/iRedMail-$VERSION/config
|
(echo "export STORAGE_BASE_DIR='/var/vmail'"; echo "export WEB_SERVER='NGINX'"; echo "export BACKEND_ORIG='PGSQL'"; echo "export BACKEND='PGSQL'"; for var in VMAIL_DB_BIND_PASSWD VMAIL_DB_ADMIN_PASSWD MLMMJADMIN_API_AUTH_TOKEN NETDATA_DB_PASSWD AMAVISD_DB_PASSWD IREDADMIN_DB_PASSWD RCM_DB_PASSWD SOGO_DB_PASSWD SOGO_SIEVE_MASTER_PASSWD IREDAPD_DB_PASSWD FAIL2BAN_DB_PASSWD PGSQL_ROOT_PASSWD DOMAIN_ADMIN_PASSWD_PLAIN; do echo "export $var='$(openssl rand -base64 48 | tr -d '+/=' | head -c 32)'"; done; echo "export FIRST_DOMAIN='$MAIL_DOMAIN'"; echo "export USE_IREDADMIN='YES'"; echo "export USE_SOGO='YES'"; echo "export USE_NETDATA='YES'"; echo "export USE_FAIL2BAN='YES'") > /root/iRedMail-$VERSION/config
|
||||||
|
|
||||||
# Set Environment Variables for Silent Deployment
|
# Set Environment Variables for Silent Deployment
|
||||||
AUTO_USE_EXISTING_CONFIG_FILE=y
|
AUTO_USE_EXISTING_CONFIG_FILE=y # (1)
|
||||||
AUTO_INSTALL_WITHOUT_CONFIRM=y
|
AUTO_INSTALL_WITHOUT_CONFIRM=y # (2)
|
||||||
AUTO_CLEANUP_REMOVE_SENDMAIL=y
|
AUTO_CLEANUP_REMOVE_SENDMAIL=y # (3)
|
||||||
AUTO_CLEANUP_REPLACE_FIREWALL_RULES=y
|
AUTO_CLEANUP_REPLACE_FIREWALL_RULES=y # (4)
|
||||||
AUTO_CLEANUP_RESTART_FIREWALL=n
|
AUTO_CLEANUP_RESTART_FIREWALL=n # (5)
|
||||||
AUTO_CLEANUP_REPLACE_MYSQL_CONFIG=y
|
AUTO_CLEANUP_REPLACE_MYSQL_CONFIG=y # (6)
|
||||||
|
|
||||||
# Deploy iRedMail via the Install Script
|
# Deploy iRedMail via the Install Script
|
||||||
cd /root/iRedMail-1.6.8
|
cd /root/iRedMail-1.6.8
|
||||||
bash iRedMail.sh
|
bash iRedMail.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
|
1. Use existing `config` file without asking for confirmation.
|
||||||
|
2. Start the installation without asking for confirmation.
|
||||||
|
3. Remove `sendmail` package without asking for confirmation.
|
||||||
|
4. Copy and use the firewall rules shipped in iRedMail installer.
|
||||||
|
5. Restart firewall service without asking for confirmation.
|
||||||
|
6. Copy and use the MySQL (server) config file shipped in iRedMail installer.
|
||||||
|
|
||||||
When the installation is completed, take note of any output it gives you for future reference. Then reboot the server to finalize the server installation.
|
When the installation is completed, take note of any output it gives you for future reference. Then reboot the server to finalize the server installation.
|
||||||
```
|
```
|
||||||
reboot
|
reboot
|
||||||
|
Reference in New Issue
Block a user