eula --agreed auth --enableshadow --passalgo=sha512 text install cdrom services --disabled="chronyd" firewall --disabled firstboot --disabled keyboard --vckeymap=us --xlayouts='us' lang en_US selinux --disabled rootpw --plaintext Passw0rd timezone Asia/Shanghai --isUtc --nontp repo --name="AppStream" --baseurl=file:///run/install/repo/AppStream clearpart --initlabel --all zerombr # LVM partitioning infomation # System bootloader configuration bootloader --append=" crashkernel=auto" --location=mbr part /boot --fstype=ext4 --size=500 part pv.010 --size=1 --grow volgroup vg_root pv.010 logvol / --vgname=vg_root --size=1 --name=lv_root --grow --fstype="xfs" %packages @Core %end %pre #!/bin/bash dd if=/dev/zero of=/dev/{s,v}d* 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 enable NetworkManager systemctl unmask 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 echo ' fs.file-max = 1048576 net.ipv4.ip_default_ttl = 64 net.core.wmem_default = 1746400 net.core.wmem_max = 3492800 net.core.rmem_default = 1746400 net.core.rmem_max = 3492800 net.core.netdev_max_backlog = 65535 net.core.somaxconn = 65535 net.core.optmem_max = 1024000 net.ipv4.ip_local_port_range = 1024 65535 net.ipv4.tcp_rmem = 4096 4096 16777216 net.ipv4.tcp_wmem = 4096 4096 16777216 net.ipv4.tcp_max_tw_buckets = 65535 net.ipv4.tcp_retries2 = 3 net.ipv4.tcp_keepalive_time = 1800 net.ipv4.tcp_keepalive_probes = 3 net.ipv4.tcp_keepalive_intvl = 30 net.ipv4.tcp_syncookies = 1 net.ipv4.tcp_fin_timeout = 30 net.ipv4.tcp_tw_reuse = 0 net.ipv4.tcp_timestamps = 0 net.ipv4.tcp_window_scaling = 0 net.ipv4.tcp_fack = 0 net.ipv4.tcp_dsack = 0 net.ipv4.tcp_mtu_probing = 1 net.ipv4.route.gc_timeout = 1000 net.ipv4.tcp_synack_retries = 1 net.ipv4.ipfrag_low_thresh = 512000 net.ipv4.ipfrag_high_thresh = 1024000 net.ipv4.icmp_echo_ignore_broadcasts = 1 net.ipv4.icmp_ignore_bogus_error_responses = 1 net.ipv4.conf.lo.secure_redirects = 1 net.ipv4.conf.default.secure_redirects = 1 net.ipv4.conf.all.secure_redirects = 1 net.ipv4.conf.all.accept_source_route = 0 net.ipv4.conf.default.accept_source_route = 0 net.ipv4.conf.all.arp_accept = 1 net.ipv4.conf.all.accept_source_route = 1 net.ipv4.conf.all.rp_filter = 1 net.ipv4.tcp_congestion_control = reno kernel.core_uses_pid = 1 ' >> /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 ' >> /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