Skip to content

Instantly share code, notes, and snippets.

@jbenninghoff
Last active November 22, 2016 19:22
Show Gist options
  • Save jbenninghoff/f9b7613e6dcc557853f347fe21ee62b4 to your computer and use it in GitHub Desktop.
Save jbenninghoff/f9b7613e6dcc557853f347fe21ee62b4 to your computer and use it in GitHub Desktop.
Fix list and clush fixes
Fix list from cluster-audit.sh findings:
Push mapr repos from node1 to all others.
Yum install dstat jq nmap nc tmux tuned vim xml2 zsh
Disable /etc/selinux/config and setenforce Permissive
chkconfig iptables off
echo 'vm.swappiness = 1' >> /etc/sysctl.conf
Not in tmpwatch: /tmp/hadoop-mapr/nm-local-dir
New hostname in /etc/sysconfig/network
Add all hosts to /etc/hosts
Edit /etc/security/limits.d/90-nproc.conf:* soft nproc 1024
* - nofiles 32K in /etc/security/limits.conf
mkdir /home/mapr; chown mapr:mapr /home/mapr; chmod 770 /home/mapr
Fix consistently on all nodes using clush:
500 clush -l root -ab 'sysctl -a > sysctl-before-mapr.txt'
502 clush -l root -ab 'head sysctl-before-mapr.txt'
506 clush -l root -ab ls /etc/yum.repos.d
510 clush -l root -ab -c mapr_core.repo --dest /etc/yum.repos.d
511 clush -l root -ab -c mapr_ecosystem.repo --dest /etc/yum.repos.d
512 clush -l root -ab -c mapr_installer.repo --dest /etc/yum.repos.d
513 clush -l root -ab yum -y install dstat jq nmap nc tmux tuned vim xml2 zsh
515 clush -l root -ab setenforce Permissive
517 clush -l root -ab "sed -i.bak 's/enforcing/permissive/' /etc/selinux/config"
518 clush -l root -ab grep SELINUX /etc/selinux/config
519 clush -l root -ab chkconfig iptables off
520 clush -l root -ab "echo 'vm.swappiness = 1' >> /etc/sysctl.conf"
clush -l root -ab "sed -i.bak '/ \/tmp$/s/10d \/tmp/-x \/tmp\/hadoop-mapr\/nm-local-dir 10d \/tmp/' /etc/cron.daily/tmpwatch"
533 clush -l root -ab 'host=${HOSTNAME%A}; host=${host,,}; sed -i.bak "s/HOSTNAME=.*/HOSTNAME=$host/" /etc/sysconfig/network'
535 clush -l root -abc hosts --dest /etc/hosts
536 clush -l root -ab "sed -i.bak '/1024/{s/1024/32768/;s/soft/-/}' /etc/security/limits.d/90-nproc.conf"
538 clush -l root -ab "echo '* - nofile 32768' >> /etc/security/limits.conf"
539 clush -l root -ab "mkdir /home/mapr; chown mapr:mapr /home/mapr; chown 770 /home/mapr"
540 clush -l root -ab reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment