准备工作
第一步:配置主机名
新机器初始化,挂载好硬盘,配置好hostname,例如 hadoop9
hostname hadoop9 vim /etc/sysconfig/network ---- HOSTNAME=hadoop9 ---- vi /etc/sysctl.conf ---- vm.swappiness = 10 ---- sysctl -p
第二步准备:安装java
mkdir /usr/java cd /usr/java rz #上传jdk包 jdk-8u201-linux-x64.tar.gz tar xzf jdk-8u201-linux-x64.tar.gz vi /etc/profile --- export JAVA_HOME=/usr/java/jdk1.8.0_201 export CLASSPATH=.:$JAVA_HOME/jre/lib/rt.jar:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar export PATH=$PATH:$JAVA_HOME/bin ---- source /etc/profile
第三步准备:
echo 0 > /proc/sys/vm/swappiness echo never > /sys/kernel/mm/transparent_hugepage/enabled echo never > /sys/kernel/mm/transparent_hugepage/defrag echo 'echo never > /sys/kernel/mm/transparent_hugepage/enabled' >> /etc/rc.local echo 'echo never > /sys/kernel/mm/transparent_hugepage/defrag'