Created
November 8, 2017 18:09
-
-
Save atimermann/4f158ba11d9cc1bb409dd3b32ff3795f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#version=CENTOS7 | |
# Arquivo de Instalação oVirt Hosts | |
install | |
################################################# | |
# Use network installation | |
################################################# | |
url --url="ftp://192.168.30.1/pub/" | |
################################################# | |
# Language | |
################################################# | |
lang pt_BR.UTF-8 | |
keyboard us | |
timezone American/Sao_Paulo --utc | |
skipx | |
################################################# | |
# Configuração Interface de Rede | |
################################################# | |
#Vrack | |
network --bootproto=dhcp --ipv6=auto --activate --device=0c:c4:7a:cb:01:1b | |
# Interface Publica | |
network --bootproto=static --ipv6=auto --device=0c:c4:7a:cb:01:1a --ip=149.56.25.149 --netmask=255.255.255.0 --gateway=149.56.25.254 --nameserver=213.186.33.99,8.8.8.8,8.8.4.4 | |
network --hostname host01.smartihost.com.br | |
################################################# | |
# Segurança | |
################################################# | |
rootpw --plaintext 9a8n4d | |
authconfig --useshadow --passalgo=SHA256 --kickstart | |
selinux --enforcing | |
################################################# | |
# System services | |
################################################# | |
services --enabled="iptables" | |
services --disabled="firewalld" | |
################################################# | |
# BOOT | |
################################################# | |
bootloader --location=mbr --append="nofb quiet splash=quiet" | |
zerombr | |
clearpart --all --initlabel | |
#Disk partitioning information | |
part /boot --fstype xfs --size 1024 --asprimary --ondrive sda | |
part / --fstype xfs --size 25000 --asprimary --ondrive sda | |
part swap --size 40000 --asprimary --ondrive sda | |
text | |
reboot | |
################################################# | |
# PACOTES | |
################################################# | |
%packages | |
yum | |
dhclient | |
ntp | |
wget | |
vim | |
nmap | |
bash-completion | |
sysstat | |
iptraf-ng | |
net-tools | |
python-ethtool | |
bzip2 | |
bind-utils | |
iptables-services | |
@Core | |
@base | |
redhat-lsb-core | |
%end | |
################################################# | |
# POST INSTALL | |
################################################# | |
# %post --nochroot | |
# | |
# exec < /dev/tty3 > /dev/tty3 | |
# | |
# #changing to VT 3 so that we can see whats going on.... | |
# /usr/bin/chvt 3 | |
# ( | |
# cp -va /etc/resolv.conf /mnt/sysimage/etc/resolv.conf | |
# /usr/bin/chvt 1 | |
# ) 2>&1 | tee /mnt/sysimage/root/install.postnochroot.log | |
# %end | |
%post --log=/root/ks-post.log | |
########################## | |
# eth1 interface | |
########################## | |
echo "Configurando Rede..." | |
real=`ip -o link | awk '/0c:c4:7a:cb:01:1b/ {print $2;}' | sed s/:$//` | |
sanitized_real=`echo $real | sed s/:/_/` | |
echo "Interface: $sanitized_real" | |
cat << EOF > /etc/sysconfig/network-scripts/ifcfg-$sanitized_real | |
BOOTPROTO="dhcp" | |
DEVICE=$real | |
HWADDR="0c:c4:7a:cb:01:1b" | |
ONBOOT=no | |
PEERDNS=yes | |
PEERROUTES=yes | |
DEFROUTE=yes | |
EOF | |
########################## | |
#update local time | |
########################## | |
echo "Atualizando Horário do Sistema..." | |
/usr/sbin/ntpdate -sub 0.fedora.pool.ntp.org | |
/usr/sbin/hwclock --systohc | |
########################## | |
# Atualizando Sistema | |
########################## | |
echo "Atualizando Sistema..." | |
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
update all the base packages from the updates repository | |
yum -t -y update | |
########################## | |
# Instala outros Pacotes | |
########################## | |
yum install -y htop | |
########################## | |
# Remove pacotes | |
########################## | |
yum remove -y firewalld | |
%end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment