SST Lab Dokuwiki Header header picture

ユーザ用ツール

サイト用ツール


linux:webserver

差分

このページの2つのバージョン間の差分を表示します。

この比較画面へのリンク

両方とも前のリビジョン前のリビジョン
次のリビジョン
前のリビジョン
次のリビジョン両方とも次のリビジョン
linux:webserver [2021/02/24 09:48] – [蓋をしてもスリープしない] kimilinux:webserver [2021/03/02 16:48] – [Ubuntu Serverによる各種Serverの構築] kimi
行 1: 行 1:
 ====== Linux環境構築(サーバ編) ====== ====== Linux環境構築(サーバ編) ======
 +===== Ubuntu Serverによる各種Serverの構築 =====
 +  - [[linux:server_install|Ubuntu Serverのインストール]]
 +  - [[linux:kvm_info|KVM (Kernel-based Virtual Machine:カーネルベース仮想マシン) ]]
 +  * [[linux:bind_install|DNSサーバの構築]]
 +  * [[linux:apache_install|Webサーバの構築]]
 +
 +  - 適当な機器に[[linux:server_install|Ubuntu Serverをインストール]]してLAMPサーバとしてセットアップしておく
 +  - [[linux:dokuwiki_install|Dokuwikiのインストール]]
 +  - [[linux:mathtex_install|MathTeXのインストール]]
 +  - [[linux:wordpress_install|WordPressのインストール]]
 +
 ===== Ubuntuによるデスクトップ環境構築 ===== ===== Ubuntuによるデスクトップ環境構築 =====
   - [[linux:Ubuntu日本語RMIXのインストール]]   - [[linux:Ubuntu日本語RMIXのインストール]]
行 9: 行 20:
 ===== Ubuntuのアップデート/アップグレード ===== ===== Ubuntuのアップデート/アップグレード =====
  
-===== Ubuntu ServerによるWeb Serverの構築 ===== 
-  - 適当な機器に[[linux:server_install|Ubuntu Serverをインストール]]してLAMPサーバとしてセットアップしておく 
-  - [[linux:dokuwiki_install|Dokuwikiのインストール]] 
-  - [[linux:mathtex_install|MathTeXのインストール]] 
-  - [[linux:wordpress_install|WordPressのインストール]] 
  
 ===== Ubuntu ServerによるMail Serverの構築 ===== ===== Ubuntu ServerによるMail Serverの構築 =====
行 43: 行 49:
  
  
 +sshで
 +  WARNING: POSSIBLE DNS SPOOFING DETECTED!
 +とか
 +  WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!
 +とかいうときは
 +  $HOME/.ssh/known_hosts
 +を編集するか
 +  ssh-keygen -R HOST名
 +でエントリーを削除する。
  
-$HOME/.ssh/known_hostsの該当行を削除すれば同じエラーは出なくなります。これはエディタで削除してもいいのですが、下記のようにssh-keygenコマンドの-Rオプションで消すこともできます。 
 ===== 固定IPv4アドレスに ===== ===== 固定IPv4アドレスに =====
 サーバの運用は固定IPアドレスで行うのが普通。そこで固定IPアドレスを設定する。 サーバの運用は固定IPアドレスで行うのが普通。そこで固定IPアドレスを設定する。
行 67: 行 81:
 </code> </code>
 で確認できる。 で確認できる。
- 
-===== Step 1: Check Virtualization Support in Ubuntu ===== 
- 
-<code sh> 
- 
-$ egrep -c '(vmx|svm)' /proc/cpuinfo 
-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 
- 
-</code> 
- 
-===== 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:  'help' for help with commands 
-       'quit' to quit 
- 
-virsh # quit 
-$ 
- 
-$ sudo apt install qemu-utils 
-$ qemu-img 
-qemu-img: Not enough arguments 
-Try 'qemu-img --help' for more information 
-$ 
- 
-$ 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: failed to initialize KVM: Permission denied 
-$ 
- 
-$ sudo apt install virtinst 
- 
-$ sudo virsh list 
-error: failed to connect to the hypervisor 
-error: Failed to connect socket to '/var/run/libvirt/libvirt-sock': No such file or directory 
- 
-$ 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 
- Id   Name   State 
--------------------- 
- 
-$ sudo apt install bridge-utils 
- 
- 
- 
-</code> 
- 
-<code sh> 
-$ sudo systemctl status libvirtd 
-[sudo] password for kimi:  
-● libvirtd.service - Virtualization daemon 
-     Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor pres> 
-     Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor pres> 
-● libvirtd.service - Virtualization daemon 
-     Loaded: loaded (/lib/systemd/system/libvirtd.service; enabled; vendor pres> 
-     Active: active (running) since Tue 2021-02-23 07:16:19 UTC; 2min 36s ago 
-TriggeredBy: ● libvirtd-ro.socket 
-             ● libvirtd-admin.socket 
-             ● libvirtd.socket 
-       Docs: man:libvirtd(8) 
-             https://libvirt.org 
-   Main PID: 982 (libvirtd) 
-      Tasks: 19 (limit: 32768) 
-     Memory: 41.8M 
-     CGroup: /system.slice/libvirtd.service 
-             ├─ 982 /usr/sbin/libvirtd 
-             ├─1099 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/defa> 
-             └─1100 /usr/sbin/dnsmasq --conf-file=/var/lib/libvirt/dnsmasq/defa> 
- 
-Feb 23 07:16:20 sstw dnsmasq[1099]: compile time options: IPv6 GNU-getopt DBus > 
-Feb 23 07:16:20 sstw dnsmasq-dhcp[1099]: DHCP, IP range 192.168.122.2 -- 192.16> 
-Feb 23 07:16:20 sstw dnsmasq-dhcp[1099]: DHCP, sockets bound exclusively to int> 
-Feb 23 07:16:20 sstw dnsmasq[1099]: reading /etc/resolv.conf 
-Feb 23 07:16:20 sstw dnsmasq[1099]: using nameserver 127.0.0.53#53 
-Feb 23 07:16:20 sstw dnsmasq[1099]: read /etc/hosts - 7 addresses 
-Feb 23 07:16:20 sstw dnsmasq[1099]: read /var/lib/libvirt/dnsmasq/default.addnh> 
-Feb 23 07:16:20 sstw dnsmasq-dhcp[1099]: read /var/lib/libvirt/dnsmasq/default.> 
-Feb 23 07:16:20 sstw dnsmasq[1099]: reading /etc/resolv.conf 
-Feb 23 07:16:20 sstw dnsmasq[1099]: using nameserver 127.0.0.53#53 
- 
-$ lsmod | grep -i kvm 
-kvm_intel             282624  0 
-kvm                   663552  1 kvm_intel 
- 
-</code> 
- 
-===== Step 3: Creating a Virtual Machine in Ubuntu ===== 
- 
- 
-<code sh> 
-$ qemu-img create -f qcow2 ssp0.qcow2 150G 
-Formatting 'ssp0.qcow2', fmt=qcow2 size=161061273600 cluster_size=65536 lazy_refcounts=off refcount_bits=16 
-$ 
-</code> 
- 
-<code sh> 
-~$ virt-install -n ssp0 -r 8192 --disk=ssp0.qcow2,bus=virtio --graphics vnc,password=vnc,listen=0.0.0.0,keymap=ja --noautoconsole -v --boot hd --cdrom ubuntu-20.04.2-live-server-amd64.iso  
- 
-Starting install... 
-Domain installation still in progress. You can reconnect to  
-the console to complete the installation process. 
-$ 
-</code> 
-  
-  - Finderから「サーバへ接続」 
-  - vnc:/ / <サーバのIPアドレス>/  
  
  
linux/webserver.txt · 最終更新: 2022/08/23 13:34 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki