HowTo: Upgrade Debian etch (4) to Debian lenny (5)
Last Update: 29 Mar 2010
Here is the summary of my experiences of an upgrade of two servers from Debian
etch to lenny. I basically followed the HowTo on http://www.cyberciti.biz/tips/howto-upgrade-debian-linux-4etch-to-5lenny-server.html#comment-154120
which gives some good advices and basically describes the needed steps.
However, as reality is, every system is a bit different and unplanned problems might occur.
First I updated apt-get to the latest version and installed the newest Kernel:
# apt-get update
# apt-get upgrade (kernel upgrade)
After this reboot the machine so the new kernel is active.
Now the apt.sources file has to be modified, so we do not check for etch updates anymore. Make a backup of the current apt.sources and change your /etc/apt/sources.list to use lenny instead of etch. Use a mirror near you:
# cp /etc/apt/sources.list /etc/apt/sources.list.etch
# vi /etc/apt/sources.list
deb http://ftp.uni-bayreuth.de/linux/Debian/debian/ lenny main non-free contrib
deb-src http://ftp.uni-bayreuth.de/linux/Debian/debian/ lenny main non-free contrib
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
From now on we use aptitude instead of apt-get (better dependency-resolve) and we make sure we use the newest version:
# aptitude update
# apt-get install apt aptitude
Note: The command to install apt and aptitude caused an arror on the second server. I had to install libc6 again (apt-get install libc6).
After this we upgrade all the existing packages and finally run the dist-upgrade command:
# aptitude upgrade
# aptitude install
# aptitude dist-ugprade
The upgrade now takes place and for most packages I ran into no problems. But once the upgrade was finished and I wanted to start the Apache webserver, a lot of errors concerning suexec showed up. This means you have to reinstall the suexec package:
# aptitude install apache2-suexec
After this, the suexec errors disappeared but two warnings stayed when trying to start Apache or checking Apache's config:
area-1:~# apache2ctl configtest
[Fri Mar 12 23:02:46 2010] [warn] The Alias directive in /etc/apache2/apache2.conf at line 240 will probably never match because it overlaps an earlier Alias.
[Fri Mar 12 23:02:47 2010] [warn] NameVirtualHost *:80 has no VirtualHosts
The warning concerning the Alias is caused by a doubled configuration once in apache2.conf and once set as symbolic link in /etc/apache2/mods-enabled. So I let the entry in apache2.conf stay and just deleted the symbolic link out of mods-enabled. The second error about the port is actually caused by the entry of port 443 in /etc/apache2/ports.conf. I restored the old ports.conf before the Debian upgrade and Apache started well and without errors again.
Now to something weird. One one of the two servers I had to reinstall mysql-server-5.0 and proftpd, they seemed to have disappeared after or during the upgrade. The other server, although having the same packages installed, did not have this problem. That's what I meant with "reality". Two commands and the missing packages were back on board again:
# aptitude install mysql-server-5.0
# aptitude install proftpd
After all the full ugprade of both servers took me around 2.5h including messing around with the Apache2 warnings/errors.
Personal Internet VMware PHP Linux Shell Bluecoat Proxy Windows Hardware Virtualization Nagios MySQL DB Monitoring Mail Android Network Wyse Hacks Tomcat Postgres Apple Mac Surveillance Backup BSD ZFS Solaris SmartOS Unix Multimedia Perl Database MongoDB CMS OTRS FreeBSD Wordpress LXC Nginx Proxmox DNS Graphics PowerDNS GlusterFS Security Chef HAProxy Icinga Ansible HTML MariaDB ELK Elasticsearch Containers Rancher Docker AWS Kibana Logstash Filebeat Varnish PGSQL PostgreSQL ElasticSearch CouchDB Bash Macintosh Container Minio Grafana InfluxDB Databases NFS OSSEC SystemD Java Zoneminder SSL TLS Icingaweb2 Cloud Wireless Kubernetes Ubuntu