OpenSUSE 15.1から15.2にアップデートする手順

OpenSUSEを15.1から2020年7月に登場した15.2にアップデートする手順を記述してます。
環境
- OS OpenSUSE 15.1
パッケージ更新
既存のパッケージを更新します。
1 2 |
sudo zypper ref sudo zypper up |
再起動しておきます。
1 |
sudo reboot |
15.2へアップグレード
rootユーザーになります。
1 |
sudo -i |
sedを利用して、バージョンを更新します。
1 2 3 4 5 6 7 8 9 |
files="$(zypper lr -u | awk -F'|' '$4 ~ /Yes/ { gsub (" ", "", $2); r="/etc/zypp/repos.d/"$2".repo"; print r }')" for f in $files do echo "Backup of $f saved to /root/ before patching it up ..." cp -f "$f" /root/ sed -i 's+/leap/15.1+/leap/$releasever+' "$f" sed -i 's+15.1.1+15.2+' "$f" sed -i 's+15.1+15.2+' "$f" done |
全リポジトリを15.2に変更します。
1 |
zypper --releasever=15.2 ref |
リポジトリを確認します。
1 2 3 4 5 6 7 8 9 10 |
zypper lr -u <出力結果> # | Alias | Name | Enabled | GPG Check | Refresh | URI --+-----------------------------------+-----------------------------------+---------+-----------+---------+------------------------------------------------------------------- 1 | openSUSE-Leap-15.2 | openSUSE-Leap-15.2 | Yes | ( p) Yes | No | cd:/?devices=/dev/disk/by-id/ata-VBOX_CD-ROM_VB1-01f003f6,/dev/sr0 2 | openSUSE-Leap-15.2-Non-Oss | openSUSE-Leap-15.2-Non-Oss | Yes | (r ) Yes | No | http://download.opensuse.org/distribution/leap/15.2/repo/non-oss/ 3 | openSUSE-Leap-15.2-Oss | openSUSE-Leap-15.2-Oss | Yes | (r ) Yes | No | http://download.opensuse.org/distribution/leap/15.2/repo/oss/ 4 | openSUSE-Leap-15.2-Update | openSUSE-Leap-15.2-Update | Yes | (r ) Yes | No | http://download.opensuse.org/update/leap/15.2/oss/ 5 | openSUSE-Leap-15.2-Update-Non-Oss | openSUSE-Leap-15.2-Update-Non-Oss | Yes | (r ) Yes | No | http://download.opensuse.o |
アップグレードを実行します。自分の場合は20分くらいかかりました。
1 |
zypper --releasever=15.2 dup |
アップグレードが完了したら、 reboo 再起動をします。
1 |
sudo reboot |
アップグレードされたか確認します。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
hostnamectl <出力結果> Static hostname: opensuse-leap-x64.vagrantup.com Transient hostname: opensuse-leap-x64 Icon name: computer-vm Chassis: vm Machine ID: b3e94e961ebe40c9be5e3271ddf03ce1 Boot ID: 95a42d3d96a14291a6f967ee6888110b Virtualization: oracle Operating System: openSUSE Leap 15.2 CPE OS Name: cpe:/o:opensuse:leap:15.2 Kernel: Linux 5.3.18-lp152.26-default Architecture: x86-64 |
アップグレードされたことが確認できます。
1 |
Operating System: openSUSE Leap 15.2 |
-
前の記事
ruby rakeコマンド実行時に「Gem::LoadError: You have already activated rake xx.xx.xx, but your Gemfile requires rake xx.xx.xx. Prepending bundle exec to your command may solve this」が発生した場合の対処法 2020.07.20
-
次の記事
CentOs8に全文検索ツール「Apache Solr」をインストールする手順 2020.07.20
コメントを書く