Server Upgrade from Debian Sarge to Debian EtchPosted: Sun 06/03/2007 by seoexpert
Today I upgraded the server running SEO Expert Blog from Debian Sarge to Debian Etch for the following reasons:
- Server Security: A secure apt and Sarge will stop being supported (no more security updates).
- Etch supports newer versions of MySQL, PHP and Apache.
- Stability: Etch is said to run more stable than Sarge.
Before you decide to upgrade your server you should consider the following:
- Does my system run stable?
- Do I need newer versions of software I am using?
- The system may not work any more after the upgrade.
For me the decision was not too hard. I experienced some problems with Web server responses on days with many concurrent visitors. Moreover, I wanted newer versions of MySQL and PHP and the possibility of using PHP5 sometime in the future. And of course security considerations played a major role, since I am running Websites and other services on this server.
The Upgrade Process
The first thing you need to do before an upgrade is to backup your important files. For backing up the Drupal files and the contents of the databases, I used a slightly modified version of this Bash shell script, which is available on Drupal.org.
I also backed up important system files and information, i.e. the complete
/var/lib/dpkg, and the output of
dpkg --get-selections "*".
Changing APT Sources
The next step was modifying the
/etc/apt/sources.list file. I simply replaced the occurrences of Sarge with Etch.
Now the main part of the upgrade starts. This is the process where fatal errors can occur leaving you with a corrupt system. Remember, if you are satisfied with your stable running system, security is not an issue and you don't need newer versions of software, why should you upgrade?
Let's go on, I stopped the Web and database servers and ran the following commands to upgrade the Debian packages in that order:
# apt-get update # apt-get install aptitude # aptitude -f --with-recommends dist-upgrade
During the upgrade you are asked several questions, in most cases the defaults were okay for me. I also kept the main configuration files, i.e.
After what was looking like a successful upgrade I rebooted the server. Phew! It started again without obvious problems.
Performance Optimization and Cleaning Up
One of my reasons for upgrading stated above was better stability and system performance, so I decided to disable some apache modules I do not need by removing these symbolic links in
Since I disabled mod_negotiation I had to comment out the apache directives that included
I also commented out directives including
AddLanguage because I do not run any multi-lingual sites.
When requesting my Drupal websites on the server I encountered an internal server error (500). The error log pointed me to the cause of the problem. I needed to remove
Options -Indexes and
Options +FollowSymLinks directives in Drupal's
.htaccess files and added them to the main configuration file
apache2.conf. I also commented out the lines in the
.htaccess file in Drupal's
Afterwards everything worked well on the Drupal sites and they give the impression of loading more quickly, due to disabling some not needed Apache modules and probably also because now I run newer versions of MySQL and PHP.
After modifying some files in the Drupal directories I wanted to perform a new backup, so I used the
su - <em>username</em> command to log in as the web user. The login worked but the following error messages were displayed:
configuration error - unknown item 'FAIL_DELAY' (notify administrator) configuration error - unknown item 'QUOTAS_ENAB' (notify administrator) configuration error - unknown item 'NOLOGIN_STR' (notify administrator) configuration error - unknown item 'ENV_HZ' (notify administrator) configuration error - unknown item 'PASS_MAX_LEN' (notify administrator) configuration error - unknown item 'CHFN_AUTH' (notify administrator) configuration error - unknown item 'CLOSE_SESSIONS' (notify administrator)
To fix these problems I needed to comment out the appropriate lines in the file
So far it looks like the upgrade from Debian Sarge to Debian Etch was a good decision for me. It took about 30 to 40 minutes all together, also due the some very good tips from my brother, whom I chatted with during the upgrade. Thanks Dirk! I hope this article is useful for those who consider upgrading from Sarge to Etch. If you have something to add, want to give feedback or tell something about your upgrade experience, simply leave a comment below.