Migrate/iRedAdmin-Pro/OSE-Pro/0.6.1

From iRedMail

(Difference between revisions)
Jump to: navigation, search
 
(12 intermediate revisions not shown)
Line 3: Line 3:
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/.
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 iRedMail-0.6.1.
+
'''Note''': This tutorial is for iRedAdmin-Pro-'''LDAP''', and at least iRedMail-0.6.1.
= Summary =
= Summary =
-
iRedMail ships iRedAdmin open source edition since iRedMail-0.5.1, it's easy to migrate from open source edition to iRedAdmin-Pro. 3 steps:
+
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
* Configure OpenLDAP
-
* Uncompress full-featured edition to apache document root
+
* Uncompress iRedAdmin-Pro to apache document root
 +
* Sync settings
* Update SQL structure
* Update SQL structure
-
* Copy settings.ini from open source edition to full-featured edition
 
-
 
= Configure OpenLDAP =
= Configure OpenLDAP =
Line 18: Line 17:
* Make sure OpenLDAP includes amavisd schema file. If it doesn't present, add it.
* Make sure OpenLDAP includes amavisd schema file. If it doesn't present, add it.
-
{{cmd||<pre>
+
{{cmd|<pre>
-
# ---- RHEL/CentOS ----
+
# ---- RHEL/CentOS/OpenSuSE ----
# File: /etc/openldap/slapd.conf
# File: /etc/openldap/slapd.conf
include /etc/openldap/schema/amavisd-new.schema
include /etc/openldap/schema/amavisd-new.schema
Line 34: Line 33:
* Restart OpenLDAP service.
* Restart OpenLDAP service.
-
{{cmd||<pre>
+
{{cmd|<pre>
-
# ---- RHEL/CentOS ----
+
# ---- RHEL/CentOS/OpenSuSE ----
# /etc/init.d/ldap restart
# /etc/init.d/ldap restart
Line 46: Line 45:
= Uncompress iRedAdmin-Pro to apache document root =
= Uncompress iRedAdmin-Pro to apache document root =
-
{{cmd||<pre>
+
{{cmd|<pre>
# ---- RHEL/CentOS ----
# ---- RHEL/CentOS ----
# tar xjf /path/to/iRedAdmin-Pro-x.y.z.tar.bz2 -C /var/www/
# tar xjf /path/to/iRedAdmin-Pro-x.y.z.tar.bz2 -C /var/www/
Line 57: Line 56:
# cd /usr/share/apache2/
# cd /usr/share/apache2/
# rm -i /usr/share/apache2/iredadmin                # <- this is a symbol link
# 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
# ln -s iRedAdmin-Pro-x.y.z iredadmin
Line 66: Line 71:
</pre>}}
</pre>}}
-
= Update SQL structure =
+
Set correct file permission:
-
iRedAdmin-Pro has some more SQL tables, we should update exist SQL structure which created by open source edition.
+
{{cmd|<pre>
 +
# chown -R iredadmin:iredadmin iredadmin              # <- OpenSuSE should use: chown -R iredadmin iredadmin
 +
# chmod -R 0755 iredadmin
 +
# chmod -R 0640 iredadmin/settings.ini
 +
</pre>}}
-
{{cmd||<pre>
+
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.
-
# mysql -uroot -p
+
-
mysql> USE iredadmin;
+
-
mysql> DELETE FROM sessions;              # <-- Force admins to re-login.
+
 +
= 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’‘’.
 +
 +
 +
{{cmd|<pre>
# ---- RHEL/CentOS ----
# ---- RHEL/CentOS ----
-
mysql> SOURCE /var/www/iredadmin/docs/samples/iredadmin.sql;
+
# cd /var/www/iredadmin/
 +
# cp settings.ini.ldap.sample settings.ini
# ---- Debian/Ubuntu ----
# ---- Debian/Ubuntu ----
-
mysql> SOURCE /usr/share/apache2/iredadmin/docs/samples/iredadmin.sql;
+
# cd /usr/share/apache2/iredadmin/
 +
# cp settings.ini.ldap.sample settings.ini
# ---- FreeBSD ----
# ---- FreeBSD ----
-
mysql> SOURCE /usr/local/www/iredadmin/docs/samples/iredadmin.sql;
+
# cd /usr/local/www/iredadmin/
 +
# cp settings.ini.ldap.sample settings.ini
</pre>}}
</pre>}}
-
Note: table 'sessions' contains login session, admins have to re-login after upgrade.
+
= Update SQL structure =
 +
iRedAdmin-Pro has some more SQL tables, we should update exist SQL structure which created by open source edition.
-
* Copy settings.ini.ldap.sample as settings.ini, sync settings.ini from open source edition.
+
{{cmd|<pre>
 +
# mysql -uroot -p
 +
mysql> USE iredadmin;
 +
mysql> DELETE FROM sessions;              # <-- Force admins to re-login.
-
{{cmd||<pre>
 
# ---- RHEL/CentOS ----
# ---- RHEL/CentOS ----
-
# cd /var/www/iredadmin/
+
mysql> SOURCE /var/www/iredadmin/docs/samples/iredadmin.sql;
-
# cp settings.ini.ldap.sample settings.ini
+
# ---- Debian/Ubuntu ----
# ---- Debian/Ubuntu ----
-
# cd /usr/share/apache2/iredadmin/
+
mysql> SOURCE /usr/share/apache2/iredadmin/docs/samples/iredadmin.sql;
-
# cp settings.ini.ldap.sample settings.ini
+
# ---- FreeBSD ----
# ---- FreeBSD ----
-
# cd /usr/local/www/iredadmin/
+
mysql> SOURCE /usr/local/www/iredadmin/docs/samples/iredadmin.sql;
-
# cp settings.ini.ldap.sample settings.ini
+
</pre>}}
</pre>}}
-
Sync settings between open source edition and new settings.ini, include database name, username, password, webmaster email address, etc. one bye one.
+
Note: table 'sessions' contains login session, admins have to re-login after upgrade.
= Restart web server to make it work =
= Restart web server to make it work =
-
{{cmd||<pre>
+
{{cmd|<pre>
# ---- RHEL/CentOS ----
# ---- RHEL/CentOS ----
# /etc/init.d/httpd restart
# /etc/init.d/httpd restart

Current revision as of 13:23, 31 March 2011

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