DVDから普通にインストール
/root/anaconda-ks.cfgをwebサーバにコピーしておく。
anaconda-ks.cfgを利用
BIOSの場合
- DVD挿入
- Esc押す
linux text ks=http://192.168.0.103:8887/anaconda-ks.cfg
EFIの場合
- DVD挿入
- e押す
- 最後に
text ks=http://192.168.0.103:8887/anaconda-ks.cfg
をつける - ctrl-x を押しBOOT (ctrl-xが効かない場合はF10)
もしくは
text ks=hd:sdc1:/ks/centos7.cfg
anaconda-ks.cfgサンプル
例1: BIOSの場合
# version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use text mode install
text
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=jp106 --xlayouts='jp106'
# System language
lang en_US.UTF-8
# custom
firewall --disabled
selinux --disabled
# Network information
network --bootproto=dhcp --device=enp0s3 --onboot=off --ipv6=auto
network --hostname=localhost.localdomain
# Root password
rootpw --lock
# Do not configure the X Window System
skipx
# System timezone
timezone Asia/Tokyo --isUtc
# user --groups=wheel --name=vagrant --password= --iscrypted --gecos="vagrant"
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
# autopart --type=plain #xfs
# autopart --type=ext4
autopart --type=btrfs
# Partition clearing information
clearpart --all --initlabel --drives=sda
%packages
@core
telnet
# logwatch
# vim-enhanced
# git
# gitweb ruby
%end
%pre
%end
%post
%end
例2: EFIの場合
# version=RHEL7
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
cdrom
# Use text mode install
text
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=jp106 --xlayouts='jp106'
# System language
lang en_US.UTF-8
firewall --disabled
selinux --disabled
# Network information
network --bootproto=static --device=enp3s0 --gateway=192.168.0.1 --ip=192.168.0.2 --nameserver=8.8.8.8,8.8.4.4 --netmask=255.255.255.0 --ipv6=auto --activate
network --hostname=centos7.local
# Root password
rootpw --lock
# Do not configure the X Window System
skipx
# System timezone
timezone Asia/Tokyo --isUtc
# user --groups=wheel --name=vagrant --password= --iscrypted
# System bootloader configuration
bootloader --location=mbr --boot-drive=sda
autopart --type=btrfs
# Partition clearing information
clearpart --all --initlabel --drives=sda
%packages
@core
%end
パスワード生成
openssl passwd -1