Difference between revisions of "Kickstart"
(Created page with "<pre> # Kickstart file automatically generated by anaconda. text #version=DEVEL lang en_US.UTF-8 keyboard de network --onboot yes --device eth0 --bootproto dhcp --noipv6 roo...") |
(No difference)
|
Latest revision as of 09:00, 23 October 2019
# Kickstart file automatically generated by anaconda. text #version=DEVEL lang en_US.UTF-8 keyboard de network --onboot yes --device eth0 --bootproto dhcp --noipv6 rootpw --iscrypted $6$qylhMLYjUTZCWJwP$7.H.DLH/XG8WCyyGy24Fdg/koBqOPq6Yz7M8TY1jgeOgTNVZkYld5d3O5ZZcBOC.D/su1m.LAUQHB/3WkD4ZI. firewall --service=ssh url --url=http://172.16.0.1/centos70/ reboot authconfig --enableshadow --passalgo=sha512 selinux --enforcing timezone --utc Europe/London bootloader --location=mbr --iscrypted --password=grub.pbkdf2.sha512.10000.55C0B246C4EF5BDC9932AA3A65C29A2E40B62E0C7405C7338CE47DF7169D0CD8E70AE293D2A0641B711715C829A18E053A88C5F159737ABCA222F71F9C06210A.58BE913BE581A3F11A55835474B10307653073698EC967B2E5480C1663956970ED3341C0AA03F34515C584AED4750A0D086178414C176B5C6CF664CCF616A58A # The following is the partition information you requested # Note that any partitions you deleted are not expressed # here so unless you clear all partitions first, this is # not guaranteed to work clearpart --none --initlabel autopart --type=lvm #repo --name="CentOS" --baseurl=cdrom:sr0 --cost=100 repo --name="DVD-CentOS" --baseurl="http://172.16.0.1/centos-local/centos70-dvd/" #User Anlegen user --groups=users --homedir=/home/localroot --name=localroot --password=$6$qylhMLYjUTZCWJwP$7.H.DLH/XG8WCyyGy24Fdg/koBqOPq6Yz7M8TY1jgeOgTNVZkYld5d3O5ZZcBOC.D/su1m.LAUQHB/3WkD4ZI. --iscrypted %packages --nobase @core wget bind-utils open-vm-tools %end %post --log=/root/my-post-log exec < /dev/tty3 > /dev/tty3 chvt 3 echo echo "################################" echo "# Running Post Configuration #" echo "################################" # set IP to static GATEWAY=route -n | grep UG | cut -d' ' -f10 ip0=`ifconfig ens192 |grep -e 'inet ' | cut -d' ' -f10 |awk '{print $1}'`; subnet=`ifconfig ens192 |grep -e 'inet ' | cut -d' ' -f13 |awk '{print $1}'`; gateway=`route -n | grep UG | cut -d' ' -f10 | awk '{print $1}'`; nslookup $ip0 | grep name | cut -d'=' -f2 | cut -d' ' -f2 > /etc/hostname echo "IPADDR=$ip0" >> /etc/sysconfig/network-scripts/ifcfg-ens192 echo "NETMASK=$subnet" >> /etc/sysconfig/network-scripts/ifcfg-ens192 echo "GATEWAY=$gateway" >> /etc/sysconfig/network-scripts/ifcfg-ens192 sed -i s/dhcp/static/g /etc/sysconfig/network-scripts/ifcfg-ens192 /etc/init.d/network restart # disable IPv6 echo "net.ipv6.conf.all.disable_ipv6 = 1" >>/etc/sysctl.conf echo "net.ipv6.conf.default.disable_ipv6 = 1" >>/etc/sysctl.conf # update the system cat >/etc/yum.repos.d/Siemens-Centos.repo <<EOF [base] name=CentOS 7 DVD baseurl=http://172.16.0.1/centos-local/centos70-dvd/ gpgcheck=0 [updates] name=CentOS Updates baseurl=http://172.16.0.1/centos/7/updates/x86_64/ gpgcheck=0 [epel] name=Extra Packages for Enterprise Linux baseurl=http://172.16.0.1/epel/7/x86_64/ gpgcheck=0 EOF rm -f /etc/yum.repos.d/C* yum update -y # Add User to sudoers echo "localroot ALL=(ALL) ALL" >> /etc/sudoers # Install virus-scanner #wget http://172.30.0.1/scripts/EraAgentInstaller.sh #chmod 777 EraAgentInstaller.sh #./EraAgentInstaller.sh #rm -f EraAgentInstaller.sh ##Measurement-Plan #3.3.3 Disable Core Dumps echo "hard core 0" >> /etc/security/limits.conf %end