From iRedMail
Jump to: navigation, search


If you already have iRedAdmin open source edition installed, you can migrate from iRedAdmin open source edition to iRedAdmin-Pro with just few steps:


  • This installation guide is used to install iRedAdmin-Pro-MySQL on Debian 5.x, Ubuntu 8.x, 9.x, 10.x.
  • iRedAdmin-Pro is official web-based admin panel for iRedMail. There're three editions available:
    • iRedAdmin-Pro-LDAP: works with OpenLDAP backend.
    • iRedAdmin-Pro-MySQL: works with MySQL backend.
    • iRedAdmin-Pro-PGSQL: works with PostgreSQL backend.

System requirements

  • iRedMail-0.8.0 or later releases. If you're looking for installation guide for iRedMail-0.7.4 or eailier releases, please go to this tutorial instead.
  • iRedAdmin-Pro-MySQL-1.3.0 or later releases.
  • Required Packages. They all are installed automatically during iRedMail installation.
    • Apache, 2.2+. Web server.
      • mod_wsgi 2.1+. Apache module used to host Python application which supports the Python WSGI interface.
    • Python 2.4+, core programming language. Warning: Python 3.x is not supported yet.
    •, 0.32+. A python-powered web framework.
      • MySQLdb. A thread-compatible interface to the popular MySQL database server that provides the Python database API.

iRedAdmin will run with a low-privileged system user: iredadmin, which is created automatically during iRedMail installation, too.

Download iRedAdmin and configure Apache web server

  • Get iRedAdmin:
    • If you purchased iRedAdmin-Pro-MySQL, you should already have it. If not, please mail to support@ to get a download link.
    • If you didn't purchase iRedAdmin-Pro-MySQL, download iRedAdmin open source edition from download page.
  • Copy iRedAdmin to /usr/share/apache2/, set correct file permissions, and create symbol link.
$ sudo tar xjf iRedAdmin-x.y.z.tar.bz2 -C /usr/share/apache2/
$ cd /usr/share/apache2/
$ sudo chown -R iredadmin:iredadmin iRedAdmin-x.y.z
$ sudo chmod -R 0755 iRedAdmin-x.y.z
$ sudo ln -s iRedAdmin-x.y.z iredadmin
  • Add apache configure file: /etc/apache2/conf.d/iredadmin.conf.
File: /etc/apache2/conf.d/iredadmin.conf
WSGISocketPrefix /var/run/wsgi
WSGIDaemonProcess iredadmin user=iredadmin threads=15
WSGIProcessGroup iredadmin

AddType text/html .py

<Directory /usr/share/apache2/iredadmin/>
    Order deny,allow
    Allow from all
  • Edit /etc/apache2/sites-enabled/default-ssl, make iredadmin accessable via HTTPS. Add below lines before </VirtualHost>:
File: /etc/apache2/sites-enabled/default-ssl
WSGIScriptAlias /iredadmin /usr/share/apache2/iredadmin/
Alias /iredadmin/static /usr/share/apache2/iredadmin/static/
  • Enable mod_wsgi module and restart apache to make it work:
$ sudo a2enmod *wsgi
$ sudo /etc/init.d/apache2 restart

Create necessary MySQL database and grant privileges

  • Create MySQL database: iredadmin. Used to store sessions, admin operation logs, etc.
# mysql -uroot -p
mysql> CREATE DATABASE iredadmin DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> USE iredadmin;
mysql> SOURCE /usr/share/apache2/iredadmin/docs/samples/iredadmin.sql;
  • Grant privileges to iredadmin user and set password for it.

WARNING: Here we use 'plain_passwd' as password of iredadmin user, please replace it with your own password.

# mysql -uroot -p
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON iredadmin.* TO iredadmin@localhost IDENTIFIED BY 'plain_passwd';

Configure iRedAdmin

The major config file of iRedAdmin is file /usr/share/apache2/iredadmin/

  • Copy example config file, and set correct file permission.
# cd /usr/share/apache2/iredadmin/
# cp
# chown iredadmin:iredadmin
# chmod 0400

NOTE: If you are installing iRedAdmin-Pro, and have iRedAdmin open source edition installed, you can simply copy from open source edition. Don't forget to set correct file owner and permission after copied.

  • Edit to fill correct SQL username/passwords.


    • All required usernames/passwords are stored in which generated during iRedMail installation, placed under iRedMail directory. e.g. /root/iRedMail-0.8.0/
    • For more inforamtion, please open, it's self-documented.
  • Restart apache web server.
# /etc/init.d/apache2 restart


If iRedAdmin doesn't work as expected, you can set debug = True in to turn on debug mode, restart apache web server, use your favourite web browser to access it again, create a new forum topic and paste error message in forum topic.

debug = True
Personal tools