My Notes for Installing Zimbra OSE on Ubuntu Server 10.04

User avatar
Site Admin
Site Admin
Posts: 871
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You

Re: My Notes for Installing Zimbra OSE on Ubuntu Server 10.0

Post: # 314Post LHammonds »

ToDoList (version 1.0)

I use the portable version of ToDoList to keep track of projects and things that need to get done.

This is a copy of my rollout project for Zimbra. Save the text into a file such as ZimbraRollout.xml

Next Tasks on my List:
- Manually add Distribution Groups to somewhat match Exchange groups
- Manually add external contacts to the global address list (have not figured out this one just yet)
- Test-run a mass mailbox conversion from Exchange to Zimbra and note amount of time required.
- End-user documentation (normal use and conversion/migration info)
- Admin-user documentation (for other admins that are not necessarily unix admins)

User avatar
Site Admin
Site Admin
Posts: 871
Joined: Fri Jul 31, 2009 6:27 pm
Are you a filthy spam bot?: No
Location: Behind You

Re: My Notes for Installing Zimbra OSE on Ubuntu Server 10.0

Post: # 315Post LHammonds »

Can I make a request that I don't see throughout your thread.

What are the steps for upgrading Zimbra on Ubuntu 10.04

7.1.2 to 7.2.0 for example.

- davidkillingsworth
As phoenix has already mentioned, it is fairly straight-forward to upgrade 7.1 to 7.2. I did not perform an upgrade for the current 7.2 instructions but the main steps are to backup your data, read the release notes thoroughly, run the install (which detects the current installation and performs an upgrade), make another backup and test everything out.

I did document my experience when I upgraded a test system from 7.1.2 to 7.1.3 in another thread that was deleted. Here is a copy of it (which includes an issue I had with the upgrade which may not be repeatable using the same versions or newer upgrades but I made note of it anyway)

Also, when comparing how these old notes might apply to the current thread and release, you would obviously need to download and use the current version which is 7.2.0 and the "temp" folder in this server layout is /var/temp

EDIT: And as an additional note, since this particular upgrade, I have found that the error regarding lock tables is related to temp tables and has been a "known" issue / bug in MySQL that has never been resolved. I'm not sure why the "integrity" report script was not slightly modified to ignore that particular error on temp tables...or at the very least change it from a critical show-stopper to just an FYI with a bit of info about it such as a link to the long-existing bug report.
Upgrade Zimbra 7.1.2 to 7.1.3

Before Upgrading

  1. Read and understand the release notes before doing anything else.
  2. Make a verified offline backup and be sure to place it at an offsite location as well.
  3. Since this is a virtual environment, might as well shutdown the server and create a snapshot of the server. Give it a name like Before 7.1.3 Upgrade and description of Ubuntu Server 10.04.4 LTS, Zimbra 7.1.3 OSE installed, Static IP:
  4. Once the snapshot is complete, start up the Ubuntu server.
Upgrade Steps

  1. At the login prompt, login with your administrator account (administrator / myadminpass) and then type su and the root password (myrootpass)
  2. Update the package database by typing aptitude update
  3. Install the latest updates by typing aptitude -y safe-upgrade
  4. Download the Open Source Edition from Open Source Edition Downloads: Enterprise Messaging and Collaboration Software by Zimbra

    Method #1 - Download from your PC

    A. Download the .tgz file and copy it to the Ubuntu share --> \\mail\share or \\\share
    B. Once copied to the server, access the console and type the following:
    mv /srv/samba/share/zcs* /temp
    Method #2 - Download directly from the server

    A. Obtain the download URL from the Zimbra OSE page
    B. Type the following commands on the server console (using the correct URL)
  5. Extract the archive by typing the following commands:
    mkdir /temp/install tar -C /temp/install --strip-components=1 -xzf /temp/zcs*
  6. Start the installation program by typing the following:
    cd /temp/install ./
  7. The following is displayed:
    Operations logged to /tmp/install.log.3865 Checking for existing installation... zimbra-ldap...FOUND zimbra-ldap-7.1.2_GA_3268.UBUNTU10_64 zimbra-logger...FOUND zimbra-logger-7.1.2_GA_3268.UBUNTU10_64 zimbra-mta...FOUND zimbra-mta-7.1.2_GA_3268.UBUNTU10_64 zimbra-snmp...FOUND zimbra-snmp-7.1.2_GA_3268.UBUNTU10_64 zimbra-store...FOUND zimbra-store-7.1.2_GA_3268.UBUNTU10_64 zimbra-apache...FOUND zimbra-apache-7.1.2_GA_3268.UBUNTU10_64 zimbra-spell...FOUND zimbra-spell-7.1.2_GA_3268.UBUNTU10_64 zimbra-convertd...NOT FOUND zimbra-memcached...NOT FOUND zimbra-proxy...NOT FOUND zimbra-archiving...NOT FOUND zimbra-cluster...NOT FOUND zimbra-core...FOUND zimbra-core-7.1.2_GA_3268.UBUNTU10_64 ZCS upgrade from 7.1.2 to 7.1.3 will be performed. Saving existing configuration file to /opt/zimbra/.saveconfig PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE. ZIMBRA, INC. ("ZIMBRA") WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT. License Terms for the Zimbra Collaboration Suite: ... a_2.1.html
  8. Agree to license agreement? Press y {ENTER}
  9. If you are missing any prerequisites, exit the installation and install them. You can install all at one time by separating each name with a space after apt-get install such as the following:
    aptitude install sysstat sqlite3
  10. Do you want to verify message store database integrity? Press y {ENTER}
  11. You will probably see the following output:
    Verifying integrity of message store databases. This may take a while. Starting mysqld...done. mysqld is alive Database errors found. /opt/zimbra/mysql/bin/mysqlcheck --defaults-file=/opt/zimbra/conf/my.cnf -S /opt/zimbra/db/mysql.sock -A -C -s -u root --password=gHEZvnZd323VvkK0uaUcDprGtYI --auto-repair mysql.general_log Error : You can't use locks with log tables. mysql.slow_log Error : You can't use locks with log tables. mysqld is alive Stopping mysqld... done. Checking for installable packages Found zimbra-core Found zimbra-ldap Found zimbra-logger Found zimbra-mta Found zimbra-snmp Found zimbra-store Found zimbra-apache Found zimbra-spell Found zimbra-memcached Found zimbra-proxy The Zimbra Collaboration Suite appears already to be installed. It can be upgraded with no effect on existing accounts, or the current installation can be completely removed prior to installation for a clean install.
  12. Do you wish to upgrade? Press y {ENTER}
  13. Install zimbra-memcached? Press n {ENTER} (this is not a multi-server)
  14. Install zimbra-proxy? Press n {ENTER} (this is not a multi-server)
  15. The system will be modified. Continue? Press y {ENTER}
  16. See notes below: I could never get past this step unless I answered "no" when asked to verify database integrity a few steps earlier.
  17. Notify Zimbra of your installation? Press n {ENTER} (feel free to answer yes if this is not a test system)
  18. Press {ENTER} to exit setup. NOTE: Log files placed in /opt/zimbra/log
After Upgrading

  1. Make a verified offline backup and be sure to place it at an offsite location as well.
  2. Since this is a virtual environment, might as well shutdown the server and create a snapshot of the server. Give it a name like After 7.1.3 Upgrade and description of Ubuntu Server 10.04.4 LTS, Zimbra 7.1.3 OSE installed, Static IP:
  3. Once the snapshot is complete, start up the Ubuntu server.
  4. Now go through your checklist of things to verify that your server is online and fully functional. If something is not working right, now is your opportunity to restore.
  5. If you are satisfied that everything is solid, delete the snapshots.
--------------------------- Start of notes after step 15 above ------------------------------

EDIT: I just did a remote VPN to work to check on how things were going but after 2 hours, it has not progressed much since I left it.

When I left work, the last message displayed was "Shutting down zimbra mail"

Two hours later, it only added one additional message saying "Backing up the ldap database"

If nothing has gone wrong, I suppose this would be a REALLY long upgrade if it actually had a bunch of users and a large mail storage.

EDIT: It is now 5 hours since I started the upgrade and it is still sitting on the "Backing up the ldap database" message. That is at least 3 hours just on this part alone. I suppose something is broken somewhere. hmmm....with a simple one-off install / upgrade and having a problem with the upgrade, it is not inspiring a lot of confidence at this point. I'll assume it is something stupid that I did (or failed to do). I'll do some problem analysis and resolution research tomorrow morning.

EDIT: I was just too curious to go to bed and sleep on it. So I pressed CTRL+Z to send the install into the background as a paused process. I then typed bg 1 which told it to continue running in the background while I did some research. The 1st thing I checked was my drive space even though the install script checks for enough space at the beginning. I typed df -h and it does show I have quite a bit of space available so running out of room was not the issue. I did notice it took several seconds to complete the command, which was the display of the remote Windows server mount. Thinking that the mount might be causing a slowdown, I typed umount /mnt/backup to temporarily unmount my remote backup server. But that did not seem to be the problem either. I then looked at the /tmp/install.log file and sure enough, I found the problem:
Stopping ldap...Failed. Killing slapd with pid 874............................................................................................................................................................................................................................................................................................................ gave up waiting! COMMAND: /opt/zimbra/libexec/zmslapcat /opt/zimbra/data/ldap hdb_db_open: database "": unclean shutdown detected; attempting recovery. hdb_db_open: database "": recovery skipped in read-only mode. Run manual recovery if errors are encountered.
For whatever reason, the ldap service failed to stop for the install script. That makes no sense to me whatsoever. I have run /etc/init.d/zimbra stop both manually and through scripts and never once had a problem stopping or starting the services. I'm at a loss for how to resolve the problem or keep it from happening again in the future.

I've read several times before to simply run the install script again after an error to see if it can get past it so I'll give that a shot right now (after I manually try to control the services). Since the install is still running in the background, I'm going to type fg 1 to bring it back to the foreground so I can press CTRL+C to break out and stop the install script and try again.

EDIT: Several hours later (after I woke up from falling asleep in my chair) I have finally figured out how to get past that problem. It did not matter if zimbra services were stopped or started before running, it always hung up during the ldap backup if I answered yes when asked to verify message store database integrity. Answering no to that question allowed the install to proceed past the ldap backup step.

--------------------------- End of notes after step 15 above ------------------------------

As a side note, I was logged into my mailbox on one of my browser tabs and did not realize it before starting the upgrade. When I went back to that tab to login and see if things were working, I was greeted with the following awesome and convenient little message:
Warning ------- The server software has been updated. It is recommended that you reload your browser so that you are up to date. Old version: 7.1.2_GA_3268 20110804130819 20110804-1312 FOSS New version: 7.1.3_GA_3346 20110928134610 20110928-1350 FOSS Would you like to reload the browser now? Warning: if you choose not to reload, there is a chance you will encounter errors. [Yes] [No]
This popup box was sitting on top of another popup box that said the following (which must have popped up 1st):
Zimbra ------ Cannot connect to server. [Show Details] [OK]

Post Reply