配置以下python
主機名 | 配置 | 網絡 |
---|---|---|
Controller | 4核4G | Interface1 192.168.100.10/24 |
Interface2 192.168.200.10/24 | ||
Compute | 4核4G | Interface1 192.168.100.20/24 |
Interface2 192.168.200.20/24 |
傳送門:linux
提取碼:zytqios
提取碼: e77ccentos
連接: 提取碼:v591bash
請查看B站搭建視頻,其中有涉及到
在安裝的時候按下 TABLE 鍵 在 ' quite ' 前面添加服務器
net.ifnames=0 biosdevname=0
#vi /etc/sysconfig/network-scripts/ifcfg-eth0 #vi /etc/sysconfig/network-scripts/ifcfg-eth1
controller的eth0 192.168.100.10 eth1 192.168.200.10 compute的eth0 192.168.100.20 eth1 192.168.200.20
配置以下網絡
[root@controller ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0 TYPE=Ethernet BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no NAME=eth0 UUID=18d3c609-4083-4f9a-9db1-bff65fe9b6e5 DEVICE=eth0 ONBOOT=yes IPADDR=192.168.100.10 PREFIX=24 IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_PRIVACY=no [root@controller ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth1 TYPE="Ethernet" BOOTPROTO="static" DEFROUTE="yes" IPV4_FAILURE_FATAL="no" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="no" NAME="eth1" UUID="58e3bd4b-9a20-40c1-b112-3570273046b0" DEVICE="eth1" ONBOOT="yes" IPADDR="192.168.200.10" PREFIX="24" GATEWAY="192.168.200.2" IPV6_PEERDNS="yes" IPV6_PEERROUTES="yes" IPV6_PRIVACY="no"
#systemctl stop firewalld;systemctl disable firewalld;setenforce 0;rm -rf /etc/yum.repos.d/*
使用鏈接工具傳輸鏡像dom
#vi /etc/yum.repos.d/local.repo [centos] name=centos gpgcheck=0 enabled=1 baseurl=file:///opt/centos [Mitaka] name=mitaka gpgcheck=0 enabled=1 baseurl=file:///opt/mitaka/Openstack-Mitaka Compute節點 #vi /etc/yum.repos.d/local.repo [root@compute ~]# cat /etc/yum.repos.d/local.repo [centos] name=centos gpgcheck=0 enabled=1 baseurl=ftp://controller/centos [Mitaka] name=mitaka gpgcheck=0 enabled=1 baseurl=ftp://controller/mitaka/Openstack-Mitaka
[root@controller ~]# mkdir /opt/{centos,mitaka} [root@controller ~]# mount CentOS-7-x86_64-DVD-1511.iso /opt/centos/ [root@controller ~]# mount Mitaka.iso /opt/mitaka/
[root@controller ~]# hostnamectl set-hostname controller [root@compute ~]# hostnamectl set-hostname compute
[root@controller ~]# vi /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.100.10 controller 192.168.100.20 compute [root@compute ~]# vi /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.100.10 controller 192.168.100.20 compute
#Controller節點 執行 ping -c 4 compute #Compute節點 執行ping -c 4 controller
[root@controller ~]# yum -y install vsftpd [root@controller ~]# vi /etc/vsftpd/vsftpd.conf 添加 anon_root=/opt
[root@controller ~]# systemctl start vsftpd;systemctl enable vsftpd
[root@controller ~]# yum -y install openstack-utils openstack-selinux python-openstackclient [root@compute ~]# yum -y install openstack-utils openstack-selinux python-openstackclient
#Controller節點安裝NTP服務 [root@controller ~]# yum -y install ntp 修改配置文件,並重啓NTP服務 [root@controller ~]# vi /etc/ntp.conf 刪除原有的server 1/2/3/4,並添加以下內容 server 127.127.1.0 fudge 127.127.1.0 stratum 10 保存退出
[root@controller ~]# systemctl restart ntpd 重啓NTP服務 [root@controller ~]# systemctl enable ntpd 設置開機啓動
安裝服務 [root@compute ~]# yum -y install ntpdate #同步controller時間 [root@compute ~]# ntpdate controller