メインコンテンツに移動

Debian 9から10にOSアップデート

2021.10.01   2022.02.15

DockerのDebian環境を起動したらサイトが表示されない。

 

画面には

SSL certificate problem: certificate has expired

だけ表示される。

 

SSL証明書の有効期限が切れているので表示されるのは把握した。

ついでにOSが9(stretch)だったので10(buster)にする。

stretch/main

#vim /etc/apt/sources.list
deb http://ftp.jp.debian.org/debian/ buster main
deb-src http://ftp.jp.debian.org/debian/ buster main
deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main
# stretch-updates, previously known as 'volatile'
deb http://ftp.jp.debian.org/debian/ buster-updates main
deb-src http://ftp.jp.debian.org/debian/ buster-updates main

# cat /etc/debian_version
10.10

# sudo apt upgrade -y

# apt-key list
/etc/apt/trusted.gpg
--------------------
pub   rsa3072 2019-03-18 [SC] [有効期限: 2024-02-16]
      1505 8500 A023 5D97 F5D1  0063 B188 E2B6 95BD 4743
uid           [  不明  ] DEB.SURY.ORG Automatic Signing Key <deb@sury.org>
sub   rsa3072 2019-03-18 [E] [有効期限: 2024-02-16]

....

/etc/apt/trusted.gpg.d/debian-archive-jessie-stable.gpg
-------------------------------------------------------
pub   rsa4096 2013-08-17 [SC] [期限切れ: 2021-08-15]
      75DD C3C4 A499 F1A1 8CB5  F3C8 CBF8 D6FD 518E 17E1
uid           [期限切れ] Jessie Stable Release Key <debian-release@lists.debian.org>

/etc/apt/trusted.gpg.d/debian-archive-stretch-automatic.gpg
-----------------------------------------------------------
pub   rsa4096 2017-05-22 [SC] [有効期限: 2025-05-20]
      E1CF 20DD FFE4 B89E 8026  58F1 E0B1 1894 F66A EC98
uid           [  不明  ] Debian Archive Automatic Signing Key (9/stretch) <ftpmaster@debian.org>
sub   rsa4096 2017-05-22 [S] [有効期限: 2025-05-20]

# apt-get update
php.ini: 設定ファイル /etc/php/7.4/cli/php.ini の新しいバージョン  (/usr/lib/php/7.4/php.ini-production.cli)
が利用可能ですが、現在インストールされているバージョンは、ローカルで変更されています。

  1. パッケージメンテナのバージョンをインストール           3. バージョン間の差異を表示        5. 状況を検討するための新しいシェルを起動
  2. 現在インストールされているローカルバージョンを保持  4. バージョン間の差異を並行表示
変更された設定ファイル php.ini について何を行いたいですか? 2

Setting up libx11-6:amd64 (2:1.6.7-1+deb10u2) ...
Setting up libgd3:amd64 (2.2.5-5.2+0~20190808.4+debian9~1.gbp6d9343) ...
Setting up librtmp1:amd64 (2.4+20151223.gitfa8646d.1-2) ...
Setting up php7.0-cli (7.0.33-54+0~20210923.59+debian9~1.gbp5052f9) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Setting up libxmuu1:amd64 (2:1.1.2-2+b3) ...
Setting up xauth (1:1.0.10-1) ...
Setting up php7.4-fpm (7.4.24-1+0~20210923.51+debian9~1.gbp767510) ...
Installing new version of config file /etc/apache2/conf-available/php7.4-fpm.conf ...
Installing new version of config file /etc/logrotate.d/php7.4-fpm ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
変更された設定ファイル
---------------------------------

php.ini: 設定ファイル /etc/php/7.4/fpm/php.ini の新しいバージョン  (/usr/lib/php/7.4/php.ini-production)
が利用可能ですが、現在インストールされているバージョンは、ローカルで変更されています。

  1. パッケージメンテナのバージョンをインストール           3. バージョン間の差異を表示        5. 状況を検討するための新しいシェルを起動
  2. 現在インストールされているローカルバージョンを保持  4. バージョン間の差異を並行表示
変更された設定ファイル php.ini について何を行いたいですか? 2

NOTICE: Not enabling PHP 7.4 FPM by default.
NOTICE: To enable PHP 7.4 FPM in Apache2 do:
NOTICE: a2enmod proxy_fcgi setenvif
NOTICE: a2enconf php7.4-fpm
NOTICE: You are seeing this message because you have apache2 package installed.
invoke-rc.d: could not determine current runlevel
invoke-rc.d: policy-rc.d denied execution of restart.
Setting up libapache2-mod-php7.4 (7.4.24-1+0~20210923.51+debian9~1.gbp767510) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
変更された設定ファイル
---------------------------------

php.ini: 設定ファイル /etc/php/7.4/apache2/php.ini の新しいバージョン  (/usr/lib/php/7.4/php.ini-production)
が利用可能ですが、現在インストールされているバージョンは、ローカルで変更されています。

  1. パッケージメンテナのバージョンをインストール           3. バージョン間の差異を表示        5. 状況を検討するための新しいシェルを起動
  2. 現在インストールされているローカルバージョンを保持  4. バージョン間の差異を並行表示
変更された設定ファイル php.ini について何を行いたいですか? 2

# apt-get update
# apt-get upgrade
# apt-get dist-upgrade

remote plugin will be disabled without php-curl extension.
# apt-get -y install apt-transport-https lsb-release ca-certificates curl

これで解決した。

 

ついでに10から11にアップデートを実行。

vim /etc/apt/sources.list

deb http://ftp.jp.debian.org/debian/ bullseye main contrib non-free
deb-src http://ftp.jp.debian.org/debian/ bullseye main contrib non-free
deb http://security.debian.org/debian-security bullseye-updates main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-updates main contrib non-free
# stretch-updates, previously known as 'volatile'
deb http://ftp.jp.debian.org/debian/ bullseye-updates main contrib non-free
deb-src http://ftp.jp.debian.org/debian/ bullseye-updates main contrib non-free

 

vim /etc/apt/sources.list.d/mysql.list

### THIS FILE IS AUTOMATICALLY CONFIGURED ### 
# You may comment out entries below, but any other modifications may be lost. 
# Use command 'dpkg-reconfigure mysql-apt-config' as root for modifications. 
deb http://repo.mysql.com/apt/debian/ bullseye mysql-apt-config 
deb http://repo.mysql.com/apt/debian/ bullseye mysql-5.7 
deb http://repo.mysql.com/apt/debian/ bullseye mysql-tools 
deb http://repo.mysql.com/apt/debian/ bullseye mysql-tools-preview 
deb-src http://repo.mysql.com/apt/debian/ bullseye mysql-5.7

Node.jsを最新に。

npm install -g n
n stable
apt purge nodejs npm
##再ログイン
exec $SHELL -l

OSアップデート実行。

apt-get update
apt-get upgrade

 

最近は開発環境ばっかり作って先に進まない。