명령줄에서 Debian(release_version 포함)을 완전히 업그레이드하는 방법은 무엇입니까?

명령줄에서 Debian(release_version 포함)을 완전히 업그레이드하는 방법은 무엇입니까?

Debian:Stable(릴리스 포함)의 모든 것을 사용 가능한 최신 안정 버전으로 완전히 업그레이드하고 싶습니다:

  • 패키지 업데이트
  • 패키지 업그레이드
  • D:S 소형 버전
  • D:S 메이저_버전
  • D:S 릴리스

각 작업은 다른 작업에 비해 재귀(월별/연간) 전체에서 단일 패스로 수행되며 release_version이 확실히 마지막 작업이 될 것이라고 생각합니다.

즉, 나는 "안정적인 데비안의 완전한 릴리스"를 만들고 싶습니다.

모든 데이터를 자동으로 백업할 때 최소한 매주/매일(매월) 이 작업을 수행하므로 문제가 발생하면 백업을 복원합니다.

버전 업그레이드를 포함하여 모든 것을 "잔인하게" 업그레이드하는 명령은 무엇입니까? 나는 생각 중입니다:

apt-get update -y && apt-get upgrade -y && apt-get dist-upgrade -y

답변1

데비안 운영체제는 최첨단이 아닙니다. 지원되는 하드웨어에 설치하면 안정성이 높습니다. 그러나 결과적으로 Debian은 소프트웨어를 사용하며 저장소의 소프트웨어는 Ubuntu의 소프트웨어보다 약간 오래되었습니다. Ubuntu는 Debian을 기반으로 하지만 지속적으로 업데이트되고 때로는 날마다 조정됩니다. 나열된 명령을 성공적으로 완료하면 모든 것이 최신 상태이고 최신 안정 버전으로 간주됩니다. 그러나 Debian 8에서 Debian 9로 업그레이드하려는 경우. 과정은 더욱 복잡해집니다.

위 명령을 실행한 후:

  • 모든 것이 순조롭게 진행되면 부분적으로 설치되었거나 누락되었거나 오래된 패키지에 대해 데이터베이스 온전성 및 일관성 검사를 수행합니다.

    dpkg -C
    
  • 보고된 문제가 없으면 어떤 패키지가 보관되어 있는지 확인하세요.

    apt-mark showhold
    
    Packages On Hold will not be upgraded, which may cause inconsistencies after Stretch upgrade. Before you move to the next part, it is recommended to fix all issues produced by both above commands.
    
  • 소스 목록을 백업하세요:

    cp /etc/apt/sources.list /etc/apt/sources.list_backup
    
  • 대신 스트레칭을 하세요.

    sed -i 's/jessie/stretch/g' /etc/apt/sources.list
    
  • 고쳐 쓰다

    apt-get update
    
  • 업그레이드 가능한 목록:

    apt list --upgradable 
        Note that if you see anything that alarms you at this point you can undo everything in reverse.
    

다음 명령은 실행 후에 실행 취소할 수 없습니다.

apt-get upgrade
apt-get dist-upgrade

자세한 내용은 다음에서 확인할 수 있습니다.여기

답변2

모든 업그레이드의 경우데비안 11"Bullseye"에는변화보안 아카이브 레이아웃에서는 코드명을 바꾸는 것만으로는 sources.list충분하지 않습니다. Windows 10에서 WSL을 사용하고 있으며 wsl --install -d DebianDebian 9가 제공되었으므로 11로 업그레이드해야 합니다.

요약은 다음과 같습니다.속도:

1. 모든 것을 백업하세요

2. 현재 버전 업데이트

sudo apt update
sudo apt upgrade

3. 편집합니다 sources.list.

이 단계가 없으면 업그레이드 명령이 새 버전을 "인식"하지 않습니다. 이것은 내가 이전에 "Debian GNU/Linux 9 (stretch)"에서 얻은 내용입니다:

$ cat /etc/apt/sources.list
deb http://deb.debian.org/debian stretch main
deb http://deb.debian.org/debian stretch-updates main
deb http://security.debian.org/debian-security/ stretch/updates main

다음으로 변경하세요.

deb http://deb.debian.org/debian bullseye main
deb http://deb.debian.org/debian bullseye-updates main
deb http://security.debian.org/debian-security/ bullseye-security main

됩니다 .stretch/updatesbullseye-security아니요 bullseye/updates!

4. 정리 및 업데이트

sudo apt clean && sudo apt update

5. 전체 업그레이드 수행

sudo apt full-upgrade

확인 성공:

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

관련 정보