Migrate/iRedAdmin-Pro/OSE-Pro/0.6.1

From iRedMail
Revision as of 07:23, 31 March 2011 by ZhangHuangbin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents


This tutorial is used to explain how to migrate iRedAdmin open source edition to iRedAdmin-Pro (full-featured edition). If it doesn't work for you, please post a new topic in our forum: http://www.iredmail.org/forum/.

Note: This tutorial is for iRedAdmin-Pro-LDAP, and at least iRedMail-0.6.1.

Summary

iRedMail ships iRedAdmin open source edition since iRedMail-0.5.1, it's easy to migrate from open source edition to iRedAdmin-Pro. 5 steps:

  • Configure OpenLDAP
  • Uncompress iRedAdmin-Pro to apache document root
  • Sync settings
  • Update SQL structure

Configure OpenLDAP

Since version 1.1.0, iRedAdmin-Pro requires OpenLDAP to use Amavisd LDAP schema for better integration, so you need to include amavisd ldap schema in OpenLDAP.

  • Make sure OpenLDAP includes amavisd schema file. If it doesn't present, add it.
Terminal:
# ---- RHEL/CentOS/OpenSuSE ----
# File: /etc/openldap/slapd.conf
include /etc/openldap/schema/amavisd-new.schema

# ---- Debian/Ubuntu ----
# File: /etc/ldap/slapd.conf
include /etc/ldap/schema/amavis.schema

# ---- FreeBSD ----
# File: /usr/local/etc/openldap/slapd.conf
include /usr/local/etc/openldap/schema/amavisd-new.schema


  • Restart OpenLDAP service.
Terminal:
# ---- RHEL/CentOS/OpenSuSE ----
# /etc/init.d/ldap restart

# ---- Debian/Ubuntu ----
# /etc/init.d/slapd restart

# ---- FreeBSD ----
# /usr/local/etc/rc.d/slapd restart

Uncompress iRedAdmin-Pro to apache document root

Terminal:
# ---- RHEL/CentOS ----
# tar xjf /path/to/iRedAdmin-Pro-x.y.z.tar.bz2 -C /var/www/
# cd /var/www/
# rm -i /var/www/iredadmin                 # <- this is a symbol link
# ln -s iRedAdmin-Pro-x.y.z iredadmin

# ---- Debian/Ubuntu ----
# tar xjf /path/to/iRedAdmin-Pro-x.y.z.tar.bz2 -C /usr/share/apache2/
# cd /usr/share/apache2/
# rm -i /usr/share/apache2/iredadmin                 # <- this is a symbol link
# ln -s iRedAdmin-Pro-x.y.z iredadmin

# ---- OpenSuSE ----
# tar xjf /path/to/iRedAdmin-Pro-x.y.z.tar.bz2 -C /srv/www/
# cd /srv/www/
# rm -i /srv/www/iredadmin                 # <- this is a symbol link
# ln -s iRedAdmin-Pro-x.y.z iredadmin

# ---- FreeBSD ----
# tar xjf /path/to/iRedAdmin-Pro-x.y.z.tar.bz2 -C /usr/local/www/
# cd /usr/local/www/
# rm -i /usr/local/www/iredadmin                 # <- this is a symbol link
# ln -s iRedAdmin-Pro-x.y.z iredadmin

Set correct file permission:

Terminal:
# chown -R iredadmin:iredadmin iredadmin              # <- OpenSuSE should use: chown -R iredadmin iredadmin
# chmod -R 0755 iredadmin
# chmod -R 0640 iredadmin/settings.ini

Note: iRedMail-0.6.1 will create system user iredadmin and group iredadmin if you have iRedAdmin open source edition installed, so we don't need to create them in above step.

Sync settings

  • Copy settings.ini.ldap.sample as settings.ini, ‘’‘sync settings from open source edition to new settings.ini, includes database name, username, password, webmaster email address, etc. one-by-one, line-by-line’‘’.


Terminal:
# ---- RHEL/CentOS ----
# cd /var/www/iredadmin/
# cp settings.ini.ldap.sample settings.ini

# ---- Debian/Ubuntu ----
# cd /usr/share/apache2/iredadmin/
# cp settings.ini.ldap.sample settings.ini

# ---- FreeBSD ----
# cd /usr/local/www/iredadmin/
# cp settings.ini.ldap.sample settings.ini

Update SQL structure

iRedAdmin-Pro has some more SQL tables, we should update exist SQL structure which created by open source edition.

Terminal:
# mysql -uroot -p
mysql> USE iredadmin;
mysql> DELETE FROM sessions;              # <-- Force admins to re-login.

# ---- RHEL/CentOS ----
mysql> SOURCE /var/www/iredadmin/docs/samples/iredadmin.sql;

# ---- Debian/Ubuntu ----
mysql> SOURCE /usr/share/apache2/iredadmin/docs/samples/iredadmin.sql;

# ---- FreeBSD ----
mysql> SOURCE /usr/local/www/iredadmin/docs/samples/iredadmin.sql;

Note: table 'sessions' contains login session, admins have to re-login after upgrade.

Restart web server to make it work

Terminal:
# ---- RHEL/CentOS ----
# /etc/init.d/httpd restart

# ---- Debian/Ubuntu ----
# /etc/init.d/apache2 restart

# ---- FreeBSD ----
# /usr/local/etc/rc.d/apache2 restart
Personal tools