Last active
August 29, 2015 14:19
-
-
Save gbraccialli/05c5c358dd5e7f6287ea to your computer and use it in GitHub Desktop.
selinux_hugepage
This file contains hidden or 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
#!/bin/bash | |
#install and configure ntp | |
yes | yum install ntp ntpdate | |
chkconfig ntpd on | |
ntpdate pool.ntp.org | |
service ntpd start | |
#disable iptables | |
chkconfig iptables off | |
service iptables stop | |
#disable selinux | |
setenforce 0 | |
sed -i 's/enforcing/disabled/g' /etc/selinux/config | |
#increase ulimits | |
printf ' - nofile 32768\n - nproc 65536\n' >> /etc/security/limits.conf | |
#disable THP | |
printf '\n# Disable Transparent HugePages\n' >> /etc/rc.local | |
printf 'if test -f /sys/kernel/mm/transparent_hugepage/enabled; then\n' >> /etc/rc.local | |
printf 'echo never > /sys/kernel/mm/transparent_hugepage/enabled\n' >> /etc/rc.local | |
printf 'fi\n' >> /etc/rc.local | |
printf 'if test -f /sys/kernel/mm/transparent_hugepage/defrag; then\n' >> /etc/rc.local | |
printf 'echo never > /sys/kernel/mm/transparent_hugepage/defrag\n' >> /etc/rc.local | |
printf 'fi\n' >> /etc/rc.local |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment