I run a SuSE 11 internet server providing some basic services.
I recently had to upgrade to a new version of SuSE (11.3) and it took my quite some time to do so.
Therefore I am listing here the necessary steps, hoping that the next time I will spend less time on such an upgrade…
Services installed
- dovecot IMAP/IMAPS Mail Server
- dovecot POP3/POP3S Mail Server
- postfix SMTP TLS MTA
- Apache HTTP/HTTPs Webserver
- Subversion Repository
- WebDAV online Disk
- BIND DNS
Preparations and basic setup
- Take the server off-line and make sure no mail arrives. The emails will be queued on the alternate MX and delivered later.
- Do the backup (
rsync
including all deletions) - Dump the installed packes to an XML using
yast2
Software Management - Install base software from boot ISO over the network
- Setup Networking
- Restore
/etc/passwd
- Restore
/etc/shadow
- Restore
/home
in the background
Setup Mail Server
- Setup postfix (check possibility to restore
/etc/sysconfig/postfix
from backup), but do not start - Setup dovecot (restore
/etc/dovecot/dovecot.conf
), but do not start - Check certificate values in
/etc/sysconfig/postfix
(or restore from backup) - Create postfix certificates and SSL CA using
mkpostfixcert
- Edit the config file
/usr/share/doc/packages/dovecot/dovecot-openssl.cnf
(attention, will be overwritten when upgrading dovecot) - Run
/usr/share/doc/packages/dovecot/mkcert.sh
- Download and install roundcube mail in
/srv/www/htdocs
Setup Apache Webserver
- Setup apache2 (check possibility to restore
/etc/sysconfig/apache2
) - Restore
/etc/apache2/vhost.d
from backup - Restore
/etc/apache2/conf.d/subversion.conf
from backup - Generate the following certificates for apache using
yast2
(mail, svn, disk) - Export the PEM encoded certificates to
/etc/apache/ssl.crt|key/
Setup BIND Name Server
- Restore
/etc/named.conf
from backup - Restore
/etc/named.d
from backup - Restore
/var/lib/named/master
from backup
Setup MySQL
- Restore
/etc/my.cnf
from backup - Restore
/var/lib/mysql
from backup
Setup Subversion
- If subversion is the same version (or compatible) just restore /srv/svn from backup
- If subversion is not compatible anymore use
svnadmin load
to load the dump from the backup
There’s noting to do for the WebDAV disk 🙂
After all the configuration files etc. have been restored and the settings in /etc/sysconfig
have been checked, run SuSEconfig for the last time and test the mail server.
Unplug from the internet and start postfix and dovecot.
Check if a locally created mail is correctly handled by postfix, amavis and successfully delivered with dovecot.
Also check if the IMAP mbox is created in /var/spool/mail
.
If this test succeeds we can restore /var/spool/mail
from backup and connect to the internet again.
Now use yast2
to edit the runlevel configuration and make sure all the services are started at boot-time.
Also start them now.
Stored e-mails should no be delivered and correctly handled by the mail server.
Test all the virtual apache servers, webmail, subversion and WebDAV.