1、修改hostname hostnamectl set-hostname 172-188-1-47 2、创建账号
useradd hadoop passwd -x 99999 hadoop3、挂载磁盘
df -h fdisk -l #挂载磁盘 mkdir /data rm -rf /data/* mkfs.xfs /dev/sdb mount /dev/sdb /data #设置开机自动挂载 echo '' >> /etc/fstab echo '/dev/sdg /data7 xfs defaults 0 0' >> /etc/fstab4、关闭THP
echo '' >> /etc/rc.d/rc.local echo 'if test -f /sys/kernel/mm/transparent_hugepage/enabled; then' >> /etc/rc.d/rc.local echo 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' >> /etc/rc.d/rc.local echo 'fi' >> /etc/rc.d/rc.local echo 'if test -f /sys/kernel/mm/transparent_hugepage/defrag; then' >> /etc/rc.d/rc.local echo 'echo never > /sys/kernel/mm/transparent_hugepage/defrag' >> /etc/rc.d/rc.local echo 'fi' >> /etc/rc.d/rc.local chmod u+x /etc/rc.d/rc.local#修改swap配置
echo 'vm.swappiness = 1' >> /etc/sysctl.conf echo 'vm.max_map_count=262144' >> /etc/sysctl.conf