一、基础平台

  1.一台装有VMware的windows系统(可联网)

  2.CentOS 7.1 64bit镜像

二、最小化安装两台CentOS 7.1 的虚拟机controller、compute1,要求如下:

  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

三、网卡配置

  网卡数目及配置参照官网(官网有绘制的结构图,可以对应着看一下);由于是在虚拟机搭建,网卡模式的选择这里不做过多讲解,可查看相关资料

  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"

四、绑定hosts

  在各节点/etc/hosts文件中添加如下:  

  # controller

  10.0.0.11 controller
  # compute1
  10.0.0.31 compute1

  最好重启系统:

reboot

五、验证各节点连通性

  在controller上:分别ping www.baidu.com 节点IP:10.0.0.31
  在compute1上:ping www.baidu.com 验证外网联通性
六、初始化安装系统工具
controller:
yum -y install net-tools ntp ntpdate vim 

compute1:

yum -y install net-tools ntpdate vim

七、配置各节点时间同步

controller:

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 ::
  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 ntpd

compute1:

crontab -e
*/ * * * * /usr/sbin/ntpdate 10.0.0.11; /sbin/hwclock -w
/usr/sbin/ntpdate 10.0.0.11; /sbin/hwclock -w

最新文章

  1. 转ASP.NET1.1请求队列限制
  2. 【BZOJ-1176&2683】Mokia&简单题 CDQ分治
  3. css\html布局及部分知识小分享~~~
  4. SPFA算法学习笔记
  5. Centos下使用Heartbeat实现集群[转]
  6. C# 数据结构--排序[上]
  7. FFT初步学习小结
  8. C#初始化数组的三种方式
  9. 数据添加到DataTable
  10. Linux下 输入 env 而得到的环境变量解读
  11. S3C6410嵌入式应用平台构建(五)——linux-3.14.4移植到OK6410-(Nand分区问题)
  12. STL front() ,back()和begin(),end()区别
  13. ASP.NET MVC5(四):数据注解和验证
  14. Making the Grade (bzoj1592)
  15. [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher 问题--MyEclipse设置JDK版本
  16. 最大公约数&&最小公倍数
  17. as3调用外部应用程序 as调用外部exe文件as3调用bat文件 未测试
  18. Java maven项目的小随笔
  19. Android之内存泄露、内存溢出、内存抖动分析
  20. 【第十章】 springboot + logback

热门文章

  1. vs2012升级到vs2013后,sql server 无法通过IP登录解决方案
  2. POJ 1163&& 3176 The Triangle(DP)
  3. C语言中函数和指针的參数传递
  4. 【Python 数据分析】module 'numpy' has no attribute 'array'
  5. 【VBA编程】13.Workbook对象的事件
  6. TX2 ROS IDE开发环境配置
  7. 03-spring学习-自动装配
  8. 02-spring学习-配置bean
  9. Asp.Net MVC项目通过Git同步到新开发设备上后无法作为网站启动
  10. EMQ学习笔记---Clean Session和Retained Message