1.一台装有VMware的windows系统(可联网)
2.CentOS 7.1 64bit镜像
controller:内存2G、硬盘100G、CPU 2核(勾选Virtualization engine中:Virtualize Intel VT-x/EPT or AMD-V/RVI,否则后期创建实例报错)、网卡2个
compute1: 内存4G、硬盘100G、CPU 2核(勾选Virtualization engine中:Virtualize Intel VT-x/EPT or AMD-V/RVI,否则后期创建实例报错)、网卡2个
系统最小化安装、关闭firewalld、selinux:
systemctl stop firewalld.service systemctl disable firewalld.service sed -i '/SELINUX/s/enforcing/disabled/g' /etc/sysconfig/selinux setenforce 0
网卡数目及配置参照官网(官网有绘制的结构图,可以对应着看一下);由于是在虚拟机搭建,网卡模式的选择这里不做过多讲解,可查看相关资料
controller:
ens33:10.0.0.11/24(NAT)
ens34: 做外部接口,不配置IP(桥接)
配置ens34保证如下:
vim /etc/sysconfig/network-scripts/ifcfg-ens34 DEVICE=ens34 TYPE=Ethernet ONBOOT="yes" BOOTPROTO="none"
compute1:
ens33:10.10.0.31/24(NAT)
ens34:做外部接口,不配置IP(桥接)
配置ens34保证如下:
vim /etc/sysconfig/network-scripts/ifcfg-ens34 DEVICE=ens34 TYPE=Ethernet ONBOOT="yes" BOOTPROTO="none"
在各节点/etc/hosts文件中添加如下:
# controller
最好重启系统:
reboot
cat /etc/ntp.conf | grep -v "#" | grep -v ^$ driftfile /var/lib/ntp/drift restrict default nomodify notrap nopeer noquery restrict 127.0.0.1 restrict ::1 restrict 10.0.1.0 mask 255.255.255.0 nomodify notrap restrict 10.0.0.0 mask 255.255.255.0 nomodify notrap server s2m.time.edu.cn iburst includefile /etc/ntp/crypto/pw keys /etc/ntp/keys disable monitor systemctl stop ntpd; ntpdate s2m.time.edu.cn;/sbin/hwclock -w;systemctl start ntpdcompute1:
crontab -e */5 * * * * /usr/sbin/ntpdate 10.0.0.11; /sbin/hwclock -w /usr/sbin/ntpdate 10.0.0.11; /sbin/hwclock -w