Debian > Debian WheezyからJessieにアップグレードする方法

更新日 2019-06-22
広告
Debian WheezyからJessieにアップグレードする方法を紹介します。 まず、Wheezyの状態で、全てのパッケージをアップグレードします。
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
次に、/etc/apt/sources.listを編集します。 "wheezy"の部分を"jessie"に変更します。 変更したら、再び、全部アップグレードします。
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get dist-upgrade
途中、パッケージ(例えばApache2とか)の設定ファイルを書き換えるかどうか?という質問を受ける場合があります。色々と設定ファイルをいじっている場合は、書き換えないほうがよいかもしれません。が、ソフトのバージョンがあがって、設定ファイルで指定するパラメータなどが変わってたりすると、古い設定ファイルだとエラーになったりします。ある意味、アップグレードする以上、避けられない話だと思います。
$ sudo reboot
アップグレード後に再起動したら、os-releaseを見てみましょう。
$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
これでアップグレード完了です。 そして、早速エラーが発生。 apache2が起動しなくなりました。
$ sudo systemctl status apache2.service
  :
Jun 18 22:31:57 subcap1 apache2[2470]: Starting web server: apache2 failed!
Jun 18 22:31:57 subcap1 apache2[2470]: The apache2 configtest failed. ... (warning).
Jun 18 22:31:57 subcap1 apache2[2470]: Output of config test was:
Jun 18 22:31:57 subcap1 apache2[2470]: apache2: Syntax error on line 207 of /etc/apache2/apache2...tory
Jun 18 22:31:57 subcap1 apache2[2470]: Action 'configtest' failed.
Jun 18 22:31:57 subcap1 apache2[2470]: The Apache error log may have more information.
Jun 18 22:31:57 subcap1 systemd[1]: apache2.service: control process exited, code=exited status=1
Jun 18 22:31:57 subcap1 systemd[1]: Failed to start LSB: Apache2 web server.
Jun 18 22:31:57 subcap1 systemd[1]: Unit apache2.service entered failed state.
apache2.confの207行目でエラーが出ているようです。 見てみると、以下の内容でした。
Include httpd.conf
httpd.confというファイルは見当たらなかったので、207行目をコメントアウトしました。 これでApache2を再起動!
Jun 18 22:43:55 subcap1 apache2[12449]: Invalid command 'LockFile', perhaps misspelled or define...t
またエラーがでました。Jessieで、Apache 2.4にバージョンアップしたので、LockFileではなくMutexを使う必要があるようです。
#LockFile ${APACHE_LOCK_DIR}/accept.lock
Mutex file:${APACHE_LOCK_DIR} default
これで無事、Apacheを起動できました。
広告
お問い合わせは sweng.tips@gmail.com まで。
inserted by FC2 system