|
Centos config kickstart
Centos config kickstart
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
#version=DEVEL
# System authorization information
auth --enableshadow --passalgo=sha512
# Use CDROM installation media
install
reboot --eject
eula --agreed
cdrom
# Use graphical install
# graphical
text
# Run the Setup Agent on first boot
firstboot --enable
ignoredisk --only-use=sda
# Keyboard layouts
keyboard --vckeymap=us --xlayouts='us','ru' --switch='grp:alt_shift_toggle'
# System language
lang ru_RU.UTF-8
# Network information
network --bootproto=dhcp --device=ens192 --ipv6=auto --activate
network --hostname=centos
# Root password
rootpw --iscrypted $6$tRup.kFLtBa4ORXH$ZrPi1w/dA0ouMGsphonN8H7a7CwyAbdyWW7/hzT8UOY8uC183fVEK7euHL/IhiP.2RvMQRSG1rk1Wi6MJlGpL.
# System services
services --disabled="chronyd"
# System timezone
timezone Asia/Yekaterinburg --isUtc --nontp
# System bootloader configuration
bootloader --append=" crashkernel=auto" --location=mbr --boot-drive=sda
autopart --type=lvm
# Partition clearing information
clearpart --none --initlabel
url --url="https://mirror.yandex.ru/centos/7/os/x86_64/"
repo --name="CentOS" --baseurl="https://mirror.yandex.ru/centos/7/os/x86_64/"
repo --name="EPEL" --baseurl="https://dl.fedoraproject.org/pub/epel/7/x86_64/"
%packages
@^minimal
@core
kexec-tools
sudo
nano
git
epel-release
net-tools
curl
wget
bash-completion
open-vm-tools
lsof
%end
%addon com_redhat_kdump --enable --reserve-mb='auto'
%end
%anaconda
pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty
pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok
pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty
%end
%post
echo "%wheel ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
/usr/bin/sed -i "s%#Port 22%Port 43389%g" "/etc/ssh/sshd_config"
/usr/bin/sed -i "s%#PubkeyAuthentication yes%PubkeyAuthentication yes" "/etc/ssh/sshd_config"
/usr/bin/sed -i "s%PasswordAuthentication yes%PasswordAuthentication no" "/etc/ssh/sshd_config"
/usr/bin/sed -i "s%#PermitRootLogin yes%PermitRootLogin no%g" "/etc/ssh/sshd_config"
/sbin/semanage port -a -t ssh_port_t -p tcp 43389
echo "AllowUsers miro ameon" >> /etc/ssh/sshd_config
%end
|
|