====== Fedora minimal インストール ====== 関連: [[linux:qemu-kvm|KVM (Kernel-based Virtual Machine) - 仮想化]]\\ ===== 最新リリース ===== 最新のリリースは以下の公式サイトで確認する。\\ [[https://getfedora.org/ja/|Get Fedora]]\\ 国内の最寄りのサーバーからダウンロードできるか確認する。\\ [[http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/releases/|]]\\ 国立大学法人 山形大学の場合は以下のディレクトリに iso イメージが存在する。\\ [[http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/releases/39/Everything/x86_64/iso/|]]\\ ===== ダウンロード ===== **Fedora**\\ [[linux:curl|cURL - クライアントサイドURL転送ライブラリ]]\\ Fedora では既にインストール済みである🤔\\ \\ **Windows**\\ curl コマンドでダウンロードする。\\ Windows の場合は [[windows:scoop|Scoop - Windows 用のコマンドラインインストーラ]] で curl を導入する。\\ Scoop で [[windows:gow|Gow (Gnu On Windows) - Linux コマンド群 (Cygwin 軽量版)]] をインストールすると一通り必要な Linux コマンドが揃っていてお勧めです。\\ ==== 国内ミラーからメディアイメージを取得 ==== [[http://ftp.yz.yamagata-u.ac.jp/pub/Linux/fedora/linux/releases/|]]\\
$ curl -LO http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/releases/39/Everything/x86_64/iso/Fedora-Everything-netinst-x86_64-39-1.5.iso
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  685M  100  685M    0     0  1590k      0  0:07:21  0:07:21 --:--:-- 1044k
$ curl -LO http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/releases/39/Everything/x86_64/iso/Fedora-Everything-39-1.5-x86_64-CHECKSUM
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  1065  100  1065    0     0   1748      0 --:--:-- --:--:-- --:--:--  1748
==== ダウンロードの検証 ==== [[:linux:gnupg|GnuPG - GNU Privacy Guard]]\\ 公式: [[https://fedoraproject.org/ja/security|Fedora keeps you safe | The Fedora Project]]\\
$ curl -O https://fedoraproject.org/fedora.gpg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  7032  100  7032    0     0   4899      0  0:00:01  0:00:01 --:--:--  4900
$ gpg --with-fingerprint --show-keys --keyid-format long fedora.gpg
gpg: ディレクトリ'/home/tomoyan/.gnupg'が作成されました
pub   rsa4096/DB4639719867C58F 2021-02-04 [SCE]
   フィンガープリント = 787E A6AE 1147 EEE5 6C40  B30C DB46 3971 9867 C58F
uid                            Fedora (35) <fedora-35-primary@fedoraproject.org>

pub   rsa4096/999F7CBF38AB71F4 2021-02-10 [SCE]
   フィンガープリント = 53DE D2CB 922D 8B8D 9E63  FD18 999F 7CBF 38AB 71F4
uid                            Fedora (36) <fedora-36-primary@fedoraproject.org>

pub   rsa4096/F55AD3FB5323552A 2021-08-10 [SCE]
   フィンガープリント = ACB5 EE4E 831C 74BB 7C16  8D27 F55A D3FB 5323 552A
uid                            Fedora (37) <fedora-37-primary@fedoraproject.org>

pub   rsa4096/809A8D7CEB10B464 2022-02-08 [SCE]
   フィンガープリント = 6A51 BBAB BA3D 5467 B617  1221 809A 8D7C EB10 B464
uid                            Fedora (38) <fedora-38-primary@fedoraproject.org>

pub   rsa4096/75CF5AC418B8E74C 2022-08-09 [SCE]
   フィンガープリント = E8F2 3996 F232 1864 0CB4  4CBE 75CF 5AC4 18B8 E74C
uid                            Fedora (39) <fedora-39-primary@fedoraproject.org>

pub   rsa4096/0727707EA15B79CC 2023-01-24 [SCE]
   フィンガープリント = 115D F9AE F857 853E E844  5D0A 0727 707E A15B 79CC
uid                            Fedora (40) <fedora-40-primary@fedoraproject.org>
$ gpgv --keyring ./fedora.gpg *-CHECKSUM
gpgv: 2023年11月03日 23時50分11秒 JSTに施された署名
gpgv:                RSA鍵E8F23996F23218640CB44CBE75CF5AC418B8E74Cを使用
gpgv: "Fedora (39) <fedora-39-primary@fedoraproject.org>"からの正しい署名
$ sha256sum -c *-CHECKSUM 2> /dev/null
Fedora-Everything-netinst-x86_64-39-1.5.iso: 完了
2> /dev/null は以下のような警告は無視できるので標準エラー出力を捨てる🤔\\
$ sha256sum -c *-CHECKSUM
Fedora-Everything-netinst-x86_64-39-1.5.iso: 完了
sha256sum: 警告: 書式が不適切な行が 17 行あります
ダウンロードでファイルが破損していたり、公式が配布するものでは無い場合は、検証が失敗するのでそのメディアイメージは使用せずに削除する😢\\
$ sha256sum -c *-CHECKSUM 2> /dev/null
Fedora-Everything-netinst-x86_64-39-1.5.iso: 失敗
$ rm Fedora-Everything-netinst-x86_64-39-1.5.iso
===== システム要件 ===== ==== Fedora 33 〜 rawhide ==== * CPU:2GHz以上のプロセッサ * メモリ:2GB以上 * 必要な空きディスク容量:15GB以上 [[fcd>ja/fedora/rawhide/release-notes/welcome/Hardware_Overview/|[rawhide] Hardware Overview]]\\ ==== Fedora 32 ==== * CPU:1GHz以上のプロセッサ * メモリ:2GB以上 * 必要な空きディスク容量:10GB以上 [[fcd>ja/fedora/f32/release-notes/welcome/Hardware_Overview/|[f32] Hardware Overview]]\\ ==== Fedora 26 〜 31 ==== * CPU:1GHz以上のプロセッサ * メモリ:1GB以上 * 必要な空きディスク容量:10GB以上 [[fcd>ja/fedora/f31/release-notes/welcome/Hardware_Overview/|[f31] Hardware Overview]]\\ ※システム要件を満たさない環境では、インストーラーが起動に失敗する、もしくは、正常動作しないので注意が必要...🤔\\ ===== インストール ===== - [[http://ftp.yz.yamagata-u.ac.jp/pub/linux/fedora/linux/releases/39/Everything/x86_64/iso/Fedora-Everything-netinst-x86_64-39-1.5.iso|Fedora-Everything-netinst-x86_64-39-1.5.iso]]を入手してDVDブートする。 - 「Fedora 39」の起動画面で [Install Fedora 39」 を選択する。 - 「FEDORA 39 へようこそ。」の画面で [日本語] - [日本語(日本)] を選択して [続行] ボタンをクリックする。 - ソフトウエアの選択は「最小限のインストール」を選択する。 - インストール先を選択する。 - ストレージの設定は「カスタム」を選択する。 - 「完了」ボタンを押す。 - 新しいマウントポイントに次のパーティション設定スキームを使用する:「Btrfs」を選択する。 - 「ここをクリックすると自動的に作成します」を押す。 - 「完了」ボタンを押す。 - ストレージの「変更の概要」で [変更を許可する] ボタンをクリックする。 - root アカウント (無効) と ユーザーの作成を行う。 - 「インストール開始」ボタンを押す。 - インストールが完了したら「システムの再起動」 ボタンをクリックする。 ==== インストールギャラリー ==== |{{:linux:fedora39_minimal_001.png|Fedora minimal 001}}|{{:linux:fedora39_minimal_002.png|Fedora minimal 002}}| |{{:linux:fedora39_minimal_003.png|Fedora minimal 003}}|{{:linux:fedora39_minimal_004.png|Fedora minimal 004}}| |{{:linux:fedora39_minimal_005.png|Fedora minimal 005}}|{{:linux:fedora39_minimal_006.png|Fedora minimal 006}}| |{{:linux:fedora39_minimal_007.png|Fedora minimal 007}}|{{:linux:fedora39_minimal_008.png|Fedora minimal 008}}| |{{:linux:fedora39_minimal_010.png|Fedora minimal 010}}|{{:linux:fedora39_minimal_011.png|Fedora minimal 011}}| |{{:linux:fedora39_minimal_012.png|Fedora minimal 012}}|{{:linux:fedora39_minimal_013.png|Fedora minimal 013}}| |{{:linux:fedora39_minimal_014.png|Fedora minimal 014}}|{{:linux:fedora39_minimal_015.png|Fedora minimal 015}}| |{{:linux:fedora39_minimal_016.png|Fedora minimal 016}}|{{:linux:fedora39_minimal_017.png|Fedora minimal 017}}| ===== Linux ホスト名の変更 ===== hostname は未設定🤔\\
$ nmcli general hostname
sudo nmcli general hostname <ホスト名>.<ドメイン名> を実行してホスト名を変更する🤔\\
$ sudo nmcli general hostname hostname.localdomain
$ nmcli general hostname
hostname.localdomain
===== ネットワークの設定 ===== デフォルトでは自動起動、DHCPの設定がされている。
$ nmcli con show
NAME    UUID                                  TYPE      DEVICE 
enp1s0  60122fc0-e975-34d0-82a8-85b915106a15  ethernet  enp1s0
$ nmcli con show enp1s0 | grep IP4
IP4.ADDRESS[1]:                         192.168.122.205/24
IP4.GATEWAY:                            192.168.122.1
IP4.ROUTE[1]:                           dst = 192.168.122.0/24, nh = 0.0.0.0, mt = 100
IP4.ROUTE[2]:                           dst = 0.0.0.0/0, nh = 192.168.122.1, mt = 100
IP4.DNS[1]:                             192.168.122.1
IPアドレスを固定する場合は以下の設定を行う。
$ sudo nmcli con modify enp1s0 \
ipv4.method manual \
ipv4.addresses "192.168.122.10/24" \
ipv4.gateway "192.168.122.1" \
ipv4.never-default no \
ipv4.dns "192.168.122.1" \
ipv4.dns-search "fireball.local"
$ sudo nmcli connection modify enp2s0 \
ipv4.method manual \
ipv4.addresses "192.168.10.254/24" \
ipv4.never-default yes
ipv4.never-default no => DEFROUTE=yes となる。\\ DNSの設定
$ sudo nano /etc/resolv.conf
nameserver 127.0.0.53
options edns0 trust-ad
search tomoyan.local
Fedora ではネットワーク設定は即時有効化するようである😊\\ /etc/resolv.conf はシンボルリンクである🤔\\
$ ll /etc/resolv.conf
lrwxrwxrwx. 1 root root 39  9月 24 14:42 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
===== 基本的なコマンドのインストール ===== minimal インストールではコマンドが足りない場合があるので、必要に応じてパッケージをインストールする。\\ 全部セットで導入する場合\\
$ sudo dnf install net-tools bind-utils jwhois pciutils usbutils expect rsync -y
Fedora 36 - x86_64 - Updates                                                   2.2 MB/s |  27 MB     00:12    
Fedora Modular 36 - x86_64 - Updates                                           654 kB/s | 2.8 MB     00:04    
メタデータの期限切れの最終確認: 0:00:40 時間前の 2022年09月24日 16時52分34秒 に実施しました。
依存関係が解決しました。
===============================================================================================================
 パッケージ                    アーキテクチャー  バージョン                           リポジトリー       サイズ
===============================================================================================================
インストール:
 bind-utils                    x86_64            32:9.16.32-1.fc36                    updates            207 k
 expect                        x86_64            5.45.4-15.fc36                       fedora             246 k
 jwhois                        x86_64            4.0-67.fc36                          fedora             113 k
 net-tools                     x86_64            2.0-0.61.20160912git.fc36            fedora             294 k
 pciutils                      x86_64            3.7.0-5.fc36                         fedora              92 k
 rsync                         x86_64            3.2.6-1.fc36                         updates            408 k
 usbutils                      x86_64            014-2.fc36                           fedora             115 k
依存関係のインストール:
 bind-libs                     x86_64            32:9.16.32-1.fc36                    updates            1.2 M
 bind-license                  noarch            32:9.16.32-1.fc36                    updates             15 k
 fstrm                         x86_64            0.6.1-4.fc36                         fedora              28 k
 hwdata                        noarch            0.362-1.fc36                         updates            1.5 M
 libpkgconf                    x86_64            1.8.0-2.fc36                         fedora              36 k
 libuv                         x86_64            1:1.44.2-1.fc36                      updates            151 k
 pkgconf                       x86_64            1.8.0-2.fc36                         fedora              41 k
 pkgconf-m4                    noarch            1.8.0-2.fc36                         fedora              14 k
 pkgconf-pkg-config            x86_64            1.8.0-2.fc36                         fedora              10 k
 tcl                           x86_64            1:8.6.12-2.fc36                      fedora             1.1 M
 xxhash-libs                   x86_64            0.8.1-2.fc36                         fedora              42 k

トランザクションの概要
===============================================================================================================
インストール  18 パッケージ

ダウンロードサイズの合計: 5.6 M
インストール後のサイズ: 22 M
パッケージのダウンロード:
(1/18): fstrm-0.6.1-4.fc36.x86_64.rpm                                           56 kB/s |  28 kB     00:00    
(2/18): jwhois-4.0-67.fc36.x86_64.rpm                                          188 kB/s | 113 kB     00:00    
(3/18): libpkgconf-1.8.0-2.fc36.x86_64.rpm                                     174 kB/s |  36 kB     00:00    
(4/18): expect-5.45.4-15.fc36.x86_64.rpm                                       291 kB/s | 246 kB     00:00    
(5/18): pkgconf-1.8.0-2.fc36.x86_64.rpm                                        259 kB/s |  41 kB     00:00    
(6/18): pciutils-3.7.0-5.fc36.x86_64.rpm                                       233 kB/s |  92 kB     00:00    
(7/18): net-tools-2.0-0.61.20160912git.fc36.x86_64.rpm                         476 kB/s | 294 kB     00:00    
(8/18): pkgconf-m4-1.8.0-2.fc36.noarch.rpm                                      45 kB/s |  14 kB     00:00    
(9/18): pkgconf-pkg-config-1.8.0-2.fc36.x86_64.rpm                              32 kB/s |  10 kB     00:00    
(10/18): xxhash-libs-0.8.1-2.fc36.x86_64.rpm                                   202 kB/s |  42 kB     00:00    
(11/18): usbutils-014-2.fc36.x86_64.rpm                                        339 kB/s | 115 kB     00:00    
(12/18): bind-license-9.16.32-1.fc36.noarch.rpm                                 87 kB/s |  15 kB     00:00    
(13/18): tcl-8.6.12-2.fc36.x86_64.rpm                                          875 kB/s | 1.1 MB     00:01    
(14/18): bind-utils-9.16.32-1.fc36.x86_64.rpm                                  335 kB/s | 207 kB     00:00    
(15/18): libuv-1.44.2-1.fc36.x86_64.rpm                                        418 kB/s | 151 kB     00:00    
(16/18): bind-libs-9.16.32-1.fc36.x86_64.rpm                                   658 kB/s | 1.2 MB     00:01    
(17/18): rsync-3.2.6-1.fc36.x86_64.rpm                                         535 kB/s | 408 kB     00:00    
(18/18): hwdata-0.362-1.fc36.noarch.rpm                                        1.1 MB/s | 1.5 MB     00:01    
---------------------------------------------------------------------------------------------------------------
合計                                                                           921 kB/s | 5.6 MB     00:06     
トランザクションの確認を実行中
トランザクションの確認に成功しました。
トランザクションのテストを実行中
トランザクションのテストに成功しました。
トランザクションを実行中
  準備             :                                                                                       1/1 
  インストール中   : libuv-1:1.44.2-1.fc36.x86_64                                                         1/18 
  インストール中   : bind-license-32:9.16.32-1.fc36.noarch                                                2/18 
  インストール中   : xxhash-libs-0.8.1-2.fc36.x86_64                                                      3/18 
  インストール中   : tcl-1:8.6.12-2.fc36.x86_64                                                           4/18 
  インストール中   : pkgconf-m4-1.8.0-2.fc36.noarch                                                       5/18 
  インストール中   : libpkgconf-1.8.0-2.fc36.x86_64                                                       6/18 
  インストール中   : pkgconf-1.8.0-2.fc36.x86_64                                                          7/18 
  インストール中   : pkgconf-pkg-config-1.8.0-2.fc36.x86_64                                               8/18 
  インストール中   : hwdata-0.362-1.fc36.noarch                                                           9/18 
  インストール中   : fstrm-0.6.1-4.fc36.x86_64                                                           10/18 
  インストール中   : bind-libs-32:9.16.32-1.fc36.x86_64                                                  11/18 
  インストール中   : bind-utils-32:9.16.32-1.fc36.x86_64                                                 12/18 
  インストール中   : pciutils-3.7.0-5.fc36.x86_64                                                        13/18 
  インストール中   : usbutils-014-2.fc36.x86_64                                                          14/18 
  インストール中   : expect-5.45.4-15.fc36.x86_64                                                        15/18 
  インストール中   : rsync-3.2.6-1.fc36.x86_64                                                           16/18 
  インストール中   : net-tools-2.0-0.61.20160912git.fc36.x86_64                                          17/18 
  scriptletの実行中: net-tools-2.0-0.61.20160912git.fc36.x86_64                                          17/18 
  インストール中   : jwhois-4.0-67.fc36.x86_64                                                           18/18 
  scriptletの実行中: jwhois-4.0-67.fc36.x86_64                                                           18/18 
  検証             : expect-5.45.4-15.fc36.x86_64                                                         1/18 
  検証             : fstrm-0.6.1-4.fc36.x86_64                                                            2/18 
  検証             : jwhois-4.0-67.fc36.x86_64                                                            3/18 
  検証             : libpkgconf-1.8.0-2.fc36.x86_64                                                       4/18 
  検証             : net-tools-2.0-0.61.20160912git.fc36.x86_64                                           5/18 
  検証             : pciutils-3.7.0-5.fc36.x86_64                                                         6/18 
  検証             : pkgconf-1.8.0-2.fc36.x86_64                                                          7/18 
  検証             : pkgconf-m4-1.8.0-2.fc36.noarch                                                       8/18 
  検証             : pkgconf-pkg-config-1.8.0-2.fc36.x86_64                                               9/18 
  検証             : tcl-1:8.6.12-2.fc36.x86_64                                                          10/18 
  検証             : usbutils-014-2.fc36.x86_64                                                          11/18 
  検証             : xxhash-libs-0.8.1-2.fc36.x86_64                                                     12/18 
  検証             : bind-libs-32:9.16.32-1.fc36.x86_64                                                  13/18 
  検証             : bind-license-32:9.16.32-1.fc36.noarch                                               14/18 
  検証             : bind-utils-32:9.16.32-1.fc36.x86_64                                                 15/18 
  検証             : hwdata-0.362-1.fc36.noarch                                                          16/18 
  検証             : libuv-1:1.44.2-1.fc36.x86_64                                                        17/18 
  検証             : rsync-3.2.6-1.fc36.x86_64                                                           18/18 

インストール済み:
  bind-libs-32:9.16.32-1.fc36.x86_64                 bind-license-32:9.16.32-1.fc36.noarch                    
  bind-utils-32:9.16.32-1.fc36.x86_64                expect-5.45.4-15.fc36.x86_64                             
  fstrm-0.6.1-4.fc36.x86_64                          hwdata-0.362-1.fc36.noarch                               
  jwhois-4.0-67.fc36.x86_64                          libpkgconf-1.8.0-2.fc36.x86_64                           
  libuv-1:1.44.2-1.fc36.x86_64                       net-tools-2.0-0.61.20160912git.fc36.x86_64               
  pciutils-3.7.0-5.fc36.x86_64                       pkgconf-1.8.0-2.fc36.x86_64                              
  pkgconf-m4-1.8.0-2.fc36.noarch                     pkgconf-pkg-config-1.8.0-2.fc36.x86_64                   
  rsync-3.2.6-1.fc36.x86_64                          tcl-1:8.6.12-2.fc36.x86_64                               
  usbutils-014-2.fc36.x86_64                         xxhash-libs-0.8.1-2.fc36.x86_64                          

完了しました!
netstat arp ifconfig route ... など
$ sudo dnf install net-tools -y
dig host nslookup nsupdate
$ sudo dnf install bind-utils -y
whois
$ sudo dnf install jwhois -y
lspci
$ sudo dnf install pciutils -y
lsusb
$ sudo dnf install usbutils -y
mkpasswd ... など
$ sudo dnf install expect -y
rsync
$ sudo dnf install rsync -y
iw, iwconfig ... **wireless-tools**は Fedora 36 では廃止されている🤔\\
$ sudo dnf install iw wireless-tools
===== レシピ===== [[linux:openssh:client|ssh クライアントの使い方]]\\ [[linux:openssh:server|ssh サーバーの設定]]\\ ===== nmcli で WiFi が unmanaged, plugin missing になる ===== NetworkManager-wifi パッケージが足りていないのが原因である。\\ 足りないパッケージをインストールする。\\
$ sudo dnf install NetworkManager-wifi
$ sudo systemctl restart NetworkManager
===== 参考文献 ===== [[https://getfedora.org/ja/security/|ダウンロードの検証方法 - getfedora.org]]\\ [[https://alt.fedoraproject.org/ja/verify.html|ダウンロードしたイメージを検証する]]\\