linux:webserver
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン次のリビジョン両方とも次のリビジョン | ||
linux:webserver [2021/02/24 09:48] – [蓋をしてもスリープしない] kimi | linux:webserver [2021/02/26 09:40] – [Ubuntu Serverによる各種Serverの構築] kimi | ||
---|---|---|---|
行 1: | 行 1: | ||
====== Linux環境構築(サーバ編) ====== | ====== Linux環境構築(サーバ編) ====== | ||
+ | ===== Ubuntu Serverによる各種Serverの構築 ===== | ||
+ | - [[linux: | ||
+ | - [[linux: | ||
+ | - [[linux: | ||
+ | |||
+ | - 適当な機器に[[linux: | ||
+ | - [[linux: | ||
+ | - [[linux: | ||
+ | - [[linux: | ||
+ | |||
===== Ubuntuによるデスクトップ環境構築 ===== | ===== Ubuntuによるデスクトップ環境構築 ===== | ||
- [[linux: | - [[linux: | ||
行 9: | 行 19: | ||
===== Ubuntuのアップデート/アップグレード ===== | ===== Ubuntuのアップデート/アップグレード ===== | ||
- | ===== Ubuntu ServerによるWeb Serverの構築 ===== | ||
- | - 適当な機器に[[linux: | ||
- | - [[linux: | ||
- | - [[linux: | ||
- | - [[linux: | ||
===== Ubuntu ServerによるMail Serverの構築 ===== | ===== Ubuntu ServerによるMail Serverの構築 ===== | ||
行 43: | 行 48: | ||
+ | sshで | ||
+ | WARNING: POSSIBLE DNS SPOOFING DETECTED! | ||
+ | とか | ||
+ | WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! | ||
+ | とかいうときは | ||
+ | $HOME/ | ||
+ | を編集するか | ||
+ | ssh-keygen -R HOST名 | ||
+ | でエントリーを削除する。 | ||
- | $HOME/ | ||
===== 固定IPv4アドレスに ===== | ===== 固定IPv4アドレスに ===== | ||
サーバの運用は固定IPアドレスで行うのが普通。そこで固定IPアドレスを設定する。 | サーバの運用は固定IPアドレスで行うのが普通。そこで固定IPアドレスを設定する。 | ||
行 67: | 行 80: | ||
</ | </ | ||
で確認できる。 | で確認できる。 | ||
- | |||
- | ===== Step 1: Check Virtualization Support in Ubuntu ===== | ||
- | |||
- | <code sh> | ||
- | |||
- | $ egrep -c ' | ||
- | 12 | ||
- | $ sudo apt install cpu-checker | ||
- | Reading package lists... Done | ||
- | . | ||
- | . | ||
- | . | ||
- | Setting up cpu-checker (0.7-1.1) ... | ||
- | Processing triggers for man-db (2.9.1-1) ... | ||
- | $ sudo kvm-ok | ||
- | INFO: /dev/kvm exists | ||
- | KVM acceleration can be used | ||
- | $ | ||
- | </ | ||
- | |||
- | ===== Step 2: Install KVM on Ubuntu 20.04 LTS ===== | ||
- | |||
- | |||
- | <code sh> | ||
- | $ sudo apt install libvirt-clients | ||
- | $ virsh | ||
- | Welcome to virsh, the virtualization interactive terminal. | ||
- | |||
- | Type: ' | ||
- | ' | ||
- | |||
- | virsh # quit | ||
- | $ | ||
- | |||
- | $ sudo apt install qemu-utils | ||
- | $ qemu-img | ||
- | qemu-img: Not enough arguments | ||
- | Try ' | ||
- | $ | ||
- | |||
- | $ sudo apt install qemu-kvm | ||
- | $ kvm | ||
- | Unable to init server: Could not connect: Connection refused | ||
- | Could not access KVM kernel module: Permission denied | ||
- | qemu-system-x86_64: | ||
- | $ | ||
- | |||
- | $ sudo apt install virtinst | ||
- | |||
- | $ sudo virsh list | ||
- | error: failed to connect to the hypervisor | ||
- | error: Failed to connect socket to '/ | ||
- | |||
- | $ sudo apt install libvirt-bin | ||
- | $ sudo apt install qemu | ||
- | $ sudo apt install qemu-kvm | ||
- | $ sudo apt install libvirt-bin | ||
- | $ sudo apt install virt-manager | ||
- | $ sudo virsh list | ||
- | | ||
- | -------------------- | ||
- | |||
- | $ sudo apt install bridge-utils | ||
- | $ | ||
- | |||
- | |||
- | </ | ||
- | |||
- | <code sh> | ||
- | $ sudo systemctl status libvirtd | ||
- | [sudo] password for kimi: | ||
- | ● libvirtd.service - Virtualization daemon | ||
- | | ||
- | | ||
- | ● libvirtd.service - Virtualization daemon | ||
- | | ||
- | | ||
- | TriggeredBy: | ||
- | ● libvirtd-admin.socket | ||
- | ● libvirtd.socket | ||
- | Docs: man: | ||
- | | ||
- | Main PID: 982 (libvirtd) | ||
- | Tasks: 19 (limit: 32768) | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | |||
- | Feb 23 07:16:20 sstw dnsmasq[1099]: | ||
- | Feb 23 07:16:20 sstw dnsmasq-dhcp[1099]: | ||
- | Feb 23 07:16:20 sstw dnsmasq-dhcp[1099]: | ||
- | Feb 23 07:16:20 sstw dnsmasq[1099]: | ||
- | Feb 23 07:16:20 sstw dnsmasq[1099]: | ||
- | Feb 23 07:16:20 sstw dnsmasq[1099]: | ||
- | Feb 23 07:16:20 sstw dnsmasq[1099]: | ||
- | Feb 23 07:16:20 sstw dnsmasq-dhcp[1099]: | ||
- | Feb 23 07:16:20 sstw dnsmasq[1099]: | ||
- | Feb 23 07:16:20 sstw dnsmasq[1099]: | ||
- | $ | ||
- | $ lsmod | grep -i kvm | ||
- | kvm_intel | ||
- | kvm | ||
- | $ | ||
- | </ | ||
- | |||
- | ===== Step 3: Creating a Virtual Machine in Ubuntu ===== | ||
- | |||
- | |||
- | <code sh> | ||
- | $ qemu-img create -f qcow2 ssp0.qcow2 150G | ||
- | Formatting ' | ||
- | $ | ||
- | </ | ||
- | |||
- | <code sh> | ||
- | ~$ virt-install -n ssp0 -r 8192 --disk=ssp0.qcow2, | ||
- | |||
- | Starting install... | ||
- | Domain installation still in progress. You can reconnect to | ||
- | the console to complete the installation process. | ||
- | $ | ||
- | </ | ||
- | |||
- | - Finderから「サーバへ接続」 | ||
- | - vnc:/ / < | ||
linux/webserver.txt · 最終更新: 2022/08/23 13:34 by 127.0.0.1