# Kickstart file automatically generated by anaconda. #version=DEVEL install lang en_US.UTF-8 keyboard us text selinux --disabled rootpw Passw0rd firewall --disabled timezone --utc Asia/Shanghai skipx bootloader --location=mbr zerombr clearpart --all part /boot --fstype=ext4 --size=1024 part swap --fstype=swap --size=8192 part / --fstype=ext4 --grow --size=200 %packages --nobase @core %end %pre #!/bin/bash dd if=/dev/zero of=/dev/{s,v}da bs=4096 count=500 mount -o remount,rw,exec /tmp %end %post sed -i 's/SELINUX=.*/SELINUX=disabled/' /etc/selinux/config systemctl stop NetworkManager systemctl disable NetworkManager systemctl mask NetworkManager sed -i 's/BOOTPROTO=.*/BOOTPROTO="static"/g' /etc/sysconfig/network-scripts/ifcfg-eth0 sed -i 's/ONBOOT=.*/ONBOOT="yes"/g' /etc/sysconfig/network-scripts/ifcfg-eth0 echo 'IPADDR= PREFIX= GATEWAY= DNS1=223.5.5.5 DNS2=114.114.114.114' >> /etc/sysconfig/network-scripts/ifcfg-eth0 sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf cat /dev/null > /etc/yum.repos.d/CentOS-Base.repo cat >/etc/yum.repos.d/CentOS-Base.repo <> /etc/sysctl.conf echo ' cpupower frequency-set -g performance #SSD performance echo 2048 > /sys/block/sd*/queue/nr_requests echo deadline > /sys/block/sd*/queue/scheduler echo 4096 > /sys/block/sda/queue/read_ahead_kb echo 200 > /sys/block/sd*/queue/iosched/read_expire echo 400 > /sys/block/sd*/queue/iosched/write_expire blockdev --setra 4096 /dev/sd* echo 100 > /proc/sys/vm/dirty_background_ratio echo 300 > /proc/sys/vm/dirty_writeback_centisecs #limits performance echo "* soft nofile 1048576" >> /etc/security/limits.conf echo "* hard nofile 1048576" >> /etc/security/limits.conf echo "* soft nproc 1048576" >> /etc/security/limits.conf echo "* hard nproc 1048576" >> /etc/security/limits.conf #mem performance echo 5 > /proc/sys/vm/swappiness echo 0 > /proc/sys/kernel/shmmax echo never > /sys/kernel/mm/transparent_hugepage/enabled echo never > /sys/kernel/mm/transparent_hugepage/defrag ' >> /etc/rc.local chmod 0777 /etc/rc.local rm -rf /root/* cp /dev/sr0/rps-xps.sh /tmp/rps-xps.sh cp /dev/cdrom/rps-xps.sh /tmp/rps-xps.sh chmod 0777 /tmp/rps-xps.sh bash /tmp/rps-xps.sh rm -rf /tmp/rps-xps.sh unmount -lf /dev/sr0 unmount -lf /dev/cdrom %end