さくらVPSにCentOS 7をISO+kickstartでインストールしたのでメモ
install | |
cdrom | |
text | |
unsupported_hardware | |
lang en_US --addsupport=ja_JP | |
keyboard jp106 | |
skipx | |
selinux --disabled | |
firewall --enabled --ssh | |
firstboot --disabled | |
authconfig --enableshadow --passalgo=sha512 | |
timezone Asia/Tokyo --utc --ntpservers="ntp.nict.jp" | |
bootloader --location=mbr --driveorder=vda --timeout=2 | |
network --activate --hostname="(hostname)" --bootproto=static --ip=(ipaddress) --netmask=255.255.254.0 --gateway=(gateway) --nameserver=(ns1),(ns2) --onboot=yes | |
reboot | |
rootpw --iscrypted $6$... | |
user --name=(username) --groups=wheel --iscrypted --password=$6$... | |
zerombr | |
clearpart --drives=vda --all --initlabel | |
part /boot --fstype=ext4 --size=512 --asprimary --ondrive=vda | |
part swap --recommended | |
part / --fstype=xfs --size=1 --asprimary --ondrive=vda --grow | |
%packages --ignoremissing --excludedocs | |
@core | |
@base | |
ssh | |
telnet | |
whois | |
ntp | |
vim-enhanced | |
%end |
1. CentOS 7 の ISO をさくらの ISO インストールに従って上げておく。 | |
2. どうにかして kickstart ファイルをつくってどこか読める場所においておく。私は既にあるサーバに http で公開した。 | |
3. ISO からインストールを開始する | |
4. 最初のメニューで tab を押してコマンドラインの編集に入る。次の内容を追加して enter で起動 | |
ip=(ipaddress)::(gateway):255.255.254.0:(hostname):eth0:none nameserver=(ns1) inst.ks=http://example.com/ks.cfg | |
5. DVD の内容チェックが始まるので Esc を押して華麗にスルー | |
6. なんか勝手にインストールされる。kickstart が読めなかったりすると怒られる。kickstart が不十分だとインストーラが止まって残りの項目を埋めるとになる。 | |
7. できたサーバにログインして yum update とかして完了 | |
---- | |
SHA512 のパスワードはなんか頑張って作る。 | |
ruby で 'password'.crypt('$6$' + rand(36 ** 8).to_s(36)) とか。 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment