1) 查询国内镜像源
http://mirrors.aliyun.com/ -->centos
https://developer.aliyun.com/mirror/centos
2) 下载CentOS 7的repo文件
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
3)
#清除缓存
yum clean all
#生成缓存
yum makecache
4)
yum -y update
systemctl stop firewalld.service
systemctl disable firewalld.service
useradd ayo
passwd ayo
mkdir /opt/software
mkdir /opt/module
chown ayo:ayo /opt/software /opt/module/
vim /etc/sudoers
root ALL=(ALL) ALL
ayo ALL=(ALL) NOPASSWD: ALL
for ((i=100;i<110;i++))
do
echo "10.0.0.$i hadoop$i" >> /etc/hosts
done
静态ip配置
# cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
IPADDR=10.0.0.100
PREFIX=24
GATEWAY=10.0.0.1
DNS1=10.0.0.1
NAME=eth0
hostnamectl set-hostname hadoop100