How to move mail hosting with ISPConfig3 (dovecot, postfix, apache2, …) from CentOS 5 to CentOS 6

28-11-2012

(Here, CentOS 5.8 with ip 10.100.1.2 and CentOS 6.3 with 10.100.1.3)

CentOS-5.8 is installing ISPConfig-3.0.3.3 and we will update to ISPConfig-3.0.4.6 on CentOS-6.3

Step1: Backup mailbox and dbispconfig database on CentOS 5.8

  • Backup all mailbox of users, mail domain

#tar czvf /backup/mailbox.tar.gz /var/mail

  • Backup dbispconfig database

#mysqldump -u root -p dbispconfig >/backup/dbispconfig.sql

#Enter password: …. (password of root user)

Step 2: Installing new CentOS 6.3 and configuring services

Step 3: Restore dbispconfig database and mailbox

  • Using phpmyadmin, drop all tables of dbispconfig databse and import the file dbispconfig.db to dbispconfig database

  • Or use:

    #mysql –host=localhost –user=root –password=XXXXXX < /var/download/dbispconfig.sql

  • Restore mailbox of all mail users

    #cd /

    #tar zxvf /var/download/mailbox.tar.gz

Step 4: Update to ISPConfig-3.0.4.6

  • Download ISPConfig-3.0.4.6.tar.gz (the present, it is lastest and stable version)

    #cd /var/dowload

    #rm -rf ispconfig3_install

    #wget http://prdownloads.sourceforge.net/ispconfig/ISPConfig-3.0.4.6.tar.gz

  • Executing update ISPConfig-3.0.3.3 to ISPConfig-3.0.4.6

    #tar zxvf ISPConfig-3.0.4.6.tar.gz

    #cd ispconfig3_install/install

    #php -q update.php

Here, User still have not login email. We need to tell Dovecot to use the file dovecot.conf that generated by ISPConfig /etc/dovecot.conf and not the default /etc/dovecot/dovecot.conf:

#cd /etc/dovecot

#mv dovecot.conf dovecot.conf.org

#ln -s ../dovecot.conf dovecot.conf

#/etc/init.d/dovecot restart

Comments

Popular posts from this blog

Web Servers Load balancing with HAProxy

Redirect all unencrypted traffic to HTTPS in Apache

Using nginx as http load balancer