CentOS7.1 安装Liberty之环境准备,1

一、基础平台

  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 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"

四、绑定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 ::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 ntpd

compute1:

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