Upgrade Debian3.1Sarge to 4.0 Etch

Source: Internet
Author: User
Tags debian server
Upgrade Debian3.1Sarge to 4.0Etch-Linux Enterprise Application-Linux server application information. The following is a detailed description. Debian 4.0 has been released. We recommend that you upgrade the system to the latest version. Upgrading a remote Debian server is just a piece of cake. Many of our current servers are built under Debian 3.1 Sarge. For example, a typical Web server includes the following software packages: Apache, PHP, Postfix, and other mail server software, Iptables firewall, backup script, and MySQL 5.x.

Process

Important steps to upgrade the system:

Check the current system;
Update the package list;
Update and release;
Update the/etc/apt/sources. list file;
Restart the system;
Test whether all programs work.
Backup System

Before upgrading your Debian system, make sure that you have backed up the data (I think it is important to back up important data every day ):

User Data, files, emails (/home,/var/www, etc)
Important system files and configuration files under/etc
Back up MySQL and other databases
List of installed software packages backed up (to reinstall/recover all software)
Step 1: Check the current system

The/etc/debian_version file is saved with the current Debian version:
$ Cat/etc/debian_version
Output:
3.1
Search for the kernel version
$ Uname-mrs
The output is
Linux 2.6.8-3-386 i686

Step 2: update the package list

Use the apt-get command:
# Apt-get update

Step 3: update and release

Use the dist-upgrade option of the apt-get command. This will upgrade Sarge to Etch. Dist-upgrade is an enhanced version of upgrade, which intelligently handles dependencies of some new software packages. Apt-get has a "smart" conflict resolution system. In the event of a conflict, it will try to upgrade most important software packages and ignore some less important software packages.
# Apt-get dist-upgrade
The upgrade process may take quite some time. Depending on the number of software installed and your network speed, it may take 10 minutes to more than an hour.

Step 4: update the/etc/apt/sources. list file

You need to manually update and modify the configuration line of the Debian security update source. This is probably a small Bug during the upgrade process. The following error message is displayed:
W: Conflicting distribution: http://security.debian.org stable/updates Release (expected stable but got sarge)
W: You may want to run apt-get update to correct these problems

Edit the/etc/apt/sources. list file:
# Vi/etc/apt/sources. list
Find the following line:
Deb http://security.debian.org/stable/updates main contrib
Replace:
Deb http://security.debian.org/etch/updates main contrib non-free
Save and close the file. Enter the following command:
# Apt-get update

Step 5: restart the system

This step is simple, just restart the system:
# Reboot

Step 6: Determine whether all programs work ......

View the current Debian version:
$ Cat/etc/debian_version
Output:
4.0

Check whether all services are running. You can view the log files.
# Netstat-tulpn
# Tail-f/var/log-file-name
# Less/var/log/dmesg
# Top
....
...
....

Use the apt-key command to manage the list of keys authenticated by apt software package. The software package uses these keys for true/false authentication. Check the Etch key in the region:
# Apt-key list

/Etc/apt/trusted. gpg
--------------------
Pub 1024D/2D230C5F 2006-01-03 [expired: 2007-02-07]
Uid Debian Archive Automatic IC Signing Key (2006)

Pub 1024D/6070D3A1 2006-11-20 [expires: 2009-07-01]
Uid Debian Archive Automatic IC Signing Key (4.0/etch)

Pub 1024D/ADB11277 2006-09-17
Uid Etch Stable Release Key

If a local key authentication error occurs, delete the key file.
# Apt-key update
# Apt-key list

Check whether there are any new updates or security updates:
# Apt-get update
# Apt-get upgrade
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.