openstack搭建准备工作
主机名与服务器ip地址
controller 192.168.23.98(控制节点) compute1 192.168.23.61(计算节点)
2.配置hosts解析
[root@controller ~]# vim /etc/hosts 添加 192.168.23.98 controller 192.168.23.61 compute1 [root@controller ~]# scp /etc/hosts root@compute1:/etc/hosts 要保证每个节点的 hosts文件统一
3.验证
[root@controller ~]# ping -c 4 compute1 PING compute1 (192.168.23.61) 56(84) bytes of data. 64 bytes from compute1 (192.168.23.61): icmp_seq=1 ttl=64 time=0.639 ms 64 bytes from compute1 (192.168.23.61): icmp_seq=2 ttl=64 time=0.307 ms 64 bytes from compute1 (192.168.23.61): icmp_seq=3 ttl=64 time=0.324 ms 64 bytes from compute1 (192.168.23.61): icmp_seq=4 ttl=64 time=0.312 ms --- compute1 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3000ms rtt min/avg/max/mdev = 0.307/0.395/0.639/0.142 ms
5.关闭selinx和防火墙firewalld
以下命令所有节点都执行 # sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config # setenforce 0 # systemctl stop firewalld.service # systemctl disable firewalld.service # reboot # sestatus –v 检查是否关闭成功 SELinux status: disabled
4.配置时间同步服务器(NTP)
控制节点 [root@controller ~]# yum install chrony -y 安装服务 [root@controller ~]# sed -i 's/#allow 192.168\/16/allow 192.168\/16/g' /etc/chrony.conf [root@controller ~]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 更改时区 启动NTP服务 [root@controller ~]# systemctl enable chronyd.service [root@controller ~]# systemctl start chronyd.service 配置计算节点 [root@compute1 ~]# yum install chrony -y [root@compute1 ~]# sed -i 's/^server.*$//g' /etc/chrony.conf [root@compute1 ~]# sed -i "N;2aserver controller iburst" /etc/chrony.conf [root@compute1 ~]# cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime 更改时区 启动NTP服务 [root@compute1 ~]# systemctl enable chronyd.service [root@compute1 ~]# systemctl start chronyd.servic
5.openstack安装包
所有节点执行 # yum install centos-release-openstack-newton -y # yum upgrade -y # yum install python-openstackclient openstack-selinux -y
基本的准备基本完成