From Fedora Project Wiki

No edit summary
Line 1: Line 1:
== HOW TOs ==
== [[My Profile]] ==


'''1. Upgrading zimbra 4.5.3 32bit to zimbra 5.0.13 64bit.'''
NOTE: Please do not upgrade any production system directly using the following method, the following method may look simple to you, but if you mess up and you don't have a deeper level system analytical/trouble shooting skill on LDAP/POSTFIX/MySQL then you are gone. So please keep necessary backups and test it on a non production box first, if you are successful then go ahead and do it on the production box.
'''Current Setup:'''
Fedora 6 32bit system running ZCS 4.5.3
'''Goal:'''
1. Upgrade to the latest edition
2. Upgarde to 64 bit for better support, scalability and performance
'''Blocking points:'''
1. Upgrading zimbra from 4.5.3 to 5.0.13 directly is not possible, you need to upgrade to 4.5.11 and then upgrade to 5.0.13.
2. Need to do a manual backup and restore of LDAP, MySQL, Mail boxes and config files.
3. ZCS versions (4.5.3, 4.5.11 & 5.0.13) should support the OS which you select.
'''The Procedure:'''
1. Install 4.5.3 64 bit in a new machine, make sure that you should have a valid DNS server which holds proper MX records and pointing to the new server. The hostname and network settings should be proper.
2. After the install verify all the services are running properly:
# su - zimbra
$ zmcontrol status
3. Stop zimbra and make sure that no other process exist in the process table (ps -ef)
$ zmcontrol status
$ ps -ef |grep -i zimbra
4. Start migrating data from old 32bit system to new 64bit system, on the 32 bit server:
* stop the client access to the system.
* Take a backup of /opt/zimbra using rsync. (here I have the backup directory /backup, when you do a production migration you can stop the service and take hard copy)
* Take the LDAP database backup
# /opt/zimbra/libexec/zmslapcat /backup
* Take the MySQL backup, here you need to take the logger database backup as well as the mail box database backup.
You can follow two methods to do this
** Copy the data files from "/opt/zimbra/db/data/" & "/opt/zimbra/logger/db/"
** Use mysqldump to backup and restore the DBs
5. Copy the /backup directory to the new 64bit server.
6. On the 64 bit server:
a. Make sure that all the zimbra services are stopped.
b. Delete the existing LDAP database ans restore yours
# rm -rf /opt/zimbra/openldap-data/*
# cp /backup/zimbra/openldap-data/DB_CONFIG /opt/zimbra/openldap-data/ (for LDAP performance)
# mkdir -p /opt/zimbra/openldap-data/logs /opt/zimbra/openldap-data/accesslog/db /opt/zimbra/openldap-data/accesslog/logs (create the required LDAP directories)
# chown -R zimbra:zimbra /opt/zimbra/openldap-data (set permissions)
# /opt/zimbra/openldap/sbin/slapadd -q -b "" -f /opt/zimbra/conf/slapd.conf -cv -l /backup/ldap.bak (restore LDAP DB)
c. Restore the config files.
# rm -rf /opt/zimbra/conf/*
# cp /backup/zimbra/conf/* /opt/zimbra/conf/
d. Copy the saved configuration and certs to the new server (this is required in upgrade)
# rm -rf /opt/zimbra/.saveconfig/*
# cp /backup/zimbra/.saveconfig/* /opt/zimbra/.saveconfig/
e. Restore MySQL DBs
# rm -rf /opt/zimbra/db/data/*
# rm -rf /opt/zimbra/logger/db/*
# cp -rv /backup/zimbra/db/data/* /opt/zimbra/db/data/
# cp -rv /backup/zimbra/logger/db/* /opt/zimbra/logger/db/
f. Restore store and index
# rm -rf /opt/zimbra/store
# rm -rf /opt/zimbra/index
# cp -rv /backup/zimbra/store /opt/zimbra/
# cp -rv /backup/zimbra/index /opt/zimbra/
g. Fix the permissions
# /opt/zimbra/libexec/zmfixperms
# chown zimbra:zimbra /opt/zimbra/store -R
# chown zimbra:zimbra /opt/zimbra/index -R
7. Start the zimbra service.
# zmcontrol start
8. Verify all the services are started.
# zmcontrol status
If all the services are "running", you are done. If you see some services are not running go ahead and do the below steps.
a. Run the ZCS 64 bit setup again on the server, type "Y" when it asks for upgrade and accept system modification message also. After this step all services should be running.
9. If you try to access your mail boxes at this time, you might get some errors while opening your mail boxes because of some index issues. Once we finishes the upgrade to 5.0.13 everything will be fine.
10. Install 64 bit ZCS 4.5.11 on the server, type "Y" when it asks for upgrade and accept system modification message. This upgrade process will take some time depending on your mail box size. Once this is done verify all the services are working properly, they should.


11. Install 64 bit ZCS 5.0.13 on the server, type "Y" when it asks for upgrade and accept system modification message. This upgrade process will take some time depending on your mail box size. Once this is done verify all the services are working properly.


12. After the installation verify your web access and admin access are working fine. If you are still getting the index issue run "zmblobchk"
== [[My Articles]] ==


13. There is chance you will be getting some certificate error if you are running ssh on a different port or due to some key mismatches on the new machine. So please run the ssh-keygen to generate the new keys.


# su - zimbra
*[[Upgrading zimbra 4.5.3 32bit to zimbra 5.0.13 64bit.]]


$ ssh-keygen -t dsa
*[[Setting Up MogileFS]]


Choose to save the generated keys at /opt/zimbra/.ssh/zimbra_identity, press enter key for blank password. Edit your /opt/zimbra/.ssh/authorized_keys and append this file with the entry from /opt/zimbra/.ssh/zimbra-identity.pub
*[[FreeIPA step by step]]
14. Stop & Start zimbra, ENJOY!!!!!!!!!!

Revision as of 09:35, 3 March 2009