Help us understand the problem. What is going on with this article?

CentOSにKVMインストール

自分用めも。

環境

$ cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)

CentOSインストール後にやること

一般ユーザ作成

# useradd udon -s /bin/bash -d /home/udon
# passwd udon
# vi /etc/sudoers
----
  ## Allows people in group wheel to run all commands
- %wheel ALL=(ALL)       ALL
+ #%wheel ALL=(ALL)       ALL

  ## Same thing without a password
- # %wheel  ALL=(ALL)       NOPASSWD: ALL
+ %wheel  ALL=(ALL)       NOPASSWD: ALL
----
# usermod -aG wheel udon

不要サービス停止

いや不要じゃないんだけどさ

$ sudo systemctl stop NetworkManager
$ sudo systemctl disable NetworkManager
$ sudo systemctl stop firewalld
$ sudo systemctl disable firewalld

if設定

うちは L2SWvlan で接続するんで。

$ sudo cp -p /etc/sysconfig/network-scripts/ifcfg-eno1 /etc/sysconfig/network-scripts/ifcfg-eno1.10
$ sudo vi /etc/sysconfig/network-scripts/ifcfg-eno1.10
----
- BOOTPROTO=dhcp
+ BOOTPROTO=static
- NAME=eno1
+ NAME=eno1.10
- ONBOOT=no
+ ONBOOT=yes
- UUID=.....
+ IPADDR=192.168.10.120
+ NETMASK=255.255.0.0
----
$ sudo service network restart

外部接続

$ sudo vi /etc/sysconfig/network
----
+ GATEWAY=192.168.200.98
----
$ sudo vi /etc/resolv.conf
----
+ nameserver 8.8.8.8
----
$ sudo service network restart

SSH ログイン遅いの嫌です

$ sudo vi /etc/ssh/sshd_config
----
- #UserDNS yes
+ UserDNS no
----
$ sudo service sshd restart

vim が無いと嫌です

$ sudo yum -y install vim

SELinux 嫌いです

$ sudo setenforace 0
$ sudo vim /etc/selinux/config
----
- SELINUX=enforcing
+ SELINUX=disable
----

KVM インストール

参考:CentOS7上にKVM環境を構築する (CUI環境)
参考:CentOSサーバ構築術 文具堂 - KVM (仮想化環境) のインストール

$ sudo yum -y install libguestfs libvirt libvirt-client python-virtinst qemu-kvm virt-manager virt-top virt-viewer virt-who virt-install bridge-utils

仕上げ

$ sudo vi /etc/yum.conf
----
+ exclude=kernel*
----
$ sudo vi /etc/sysconfig/kernel
----
- UPDATEDEFAULT=yes
+ UPDATEDEFAULT=no
----
$ sudo yum -y update

$ sudo cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした