Debian: Upgrading from Lenny -> Squeeze -> Wheezy

Discussion in 'Installation/Configuration' started by Norman, Jul 15, 2013.

  1. Norman

    Norman Member HowtoForge Supporter

    Disclaimer: By no means do I take responsibility if your setup gets borked beyond repair. Keep backups of dbispconfig, customer-data (mail, web, sql) before you proceed (especially of /etc/ as you might want configs later, cert files).

    The upgrade guide from howtoforge is pretty good, and that's what I base my findings on.
    This guide is for the earlybirds who started with ispconfig 3 back in lenny, carried over to squeeze and now want Wheezy.

    This wont be a step to step guide and requires some in depth knowledge of ISPconfig and Debian. It's basicly just to save some time not having to google or do tests yourself.

    Lenny to Squeeze is quite painless. You will have to be careful about merging and updating the configs during apt-get upgrade/dist-upgrade unless you know what you are doing.
    There are some pitfalls to mention with upgrade to Wheezy however.

    1. apache2 will fail to start and mention something on the lines of "line 9" syntax error complaining about your listen 80. (if your kernel is older)

    Googling this result yields some info about libapr1 needing to be rebuilt from source. Wrong, it's much easier to just upgrade kernel and rely on the built in libapr1 from debian repo.

    2. You will want to remove "skip-bdb" from your my.cnf config file. It breaks upgrade.
    If mysql-server is non-functional, fix this easily by apt-get install mysql-server-5.5 after the last dist-upgrade step.

    3. Install php5-fpm packages and other php packages (just copy paste it from the perfect setup guides) .

    4. (the most annoying step) If you use ispconfig 3 and used courier-imap/pop in the past.
    Dont expect courier to work "at all" without major difficulties.

    Save yourself some time and just get dovecot installed. You will want to purge postfix, amavisd-new, spamassassin, clamav, spamc, courier* and anyother mailrelated packages from old install instructions and then just do it from scratch (ispconfig update will be used to regenerate the postfix/amavis configs necessary). Follow the perfect setup wheezy guide from scratch on the mail step.
    Install dovecot.
    Generate new smtpd.key and smtpd.cert in /etc/postfix . (dovecot wont start without it, and ispconfig upgrade doesnt create it manually, only the install would but you dont want to run that as it'd probably overwrite and reset your ispconfig db).

    Use the conversion script till wrote to configure ispconfig for dovecot instead. (see resources below)

    Pitfalls: If your install is old, then ISPconfig 3 never created the GRANT for for ispconfig database user. This is the issue that someone experienced in this bugtrack ticket ( ) although Till just says the setup is wrong, it's actually because legacy systems didnt properly setup GRANTS for host only for "localhost" .

    Add it to mysql grants and flush privileges.
    GRANT SELECT, INSERT, UPDATE, DELETE ON dbispconfig.* TO 'ispconfig'@'' IDENTIFIED BY 'yourpassword';

    Install dovecot, reinstall squirrelmail (if you use it).
    Add chown ispconfig -R the data and tmp dir in /var/lib/squirrelmail or confs cant be created through ispconfig.

    5. Now download the ispconfig 3 install package, unzip it, go to install folder and run php -q update.php .
    Re-run permissions , services and stuff.

    Restart services that might've had issues with mysql, check the log files. If you see any issues go back and look over what you might've missed.

    If anyone has something to add that I might've missed, please feel free to say.

    It should be pretty easy to migrate from any other mysql integrated ftp server to any newer ones.
    I havent yet tried to migrate from mydns to bind but Ill try this later if I find mydns breaking too much. ( This is a Q for Till, how to properly migrate from mydns to bind while keeping all the zones?)

    Resources: Migrate your courier /var/vmail structure to dovecot /var/vmail Maildir structure
    (use the remote api) (Lenny to Squeeze, proftpd pitfalls)
    Last edited: Jul 15, 2013
  2. Turbanator

    Turbanator Member HowtoForge Supporter

    I havent yet tried to migrate from mydns to bind but Ill try this later if I find mydns breaking too much. ( This is a Q for Till, how to properly migrate from mydns to bind while keeping all the zones?)
    I am wanting to do this i the next few days before I upgrade Lenny to Squeeze. I've found a few threads but nothing concrete.
  3. Norman

    Norman Member HowtoForge Supporter

    Some more notes:
    Dovecot is quite picky about selfsigned certificates.
    I would recommend to sign both postfix and dovecot certificates by one of the cheapest thirdparty signers.

    Means dovecot wont complain anymore about the certs.
  4. Turbanator

    Turbanator Member HowtoForge Supporter

    Here are the steps from Till on mydns->bind

    1) Stop ynad uninstall mydns
    2) Install bind and switch dns server to bind in ispconfig under System > server config
    3) run the ispconfig update with reconfigure services
    4) login to ispconfig and run the resync (Tools > resync) for the dns records.
    5) Check the file /var/log/syslog for errors. Mydns is more fault tolerant then bind in some cases, so it might be that bind complains about syntax issues in some zones. Check the zones in ispconfig dns module and correct the issues.

Share This Page