编辑ens33网卡配置文件(修改前最好先备份),将NAME=ens33、DEVICE=ens33改为NAME=eth0、DEVICE=eth0,保存退出
cd /etc/sysconfig/network-scripts/
ls
vim ifcfg-ens33
NAME=ens33 > NAME=eth0
DEVICE=ens33 > DEVICE=eth0
IPADDR=192.168.43.200
NETMASK=255.255.255.0
GATEWAY=192.168.43.2
DNS1=114.114.114.114
cd /etc/sysconfig/network-scripts/
ls
mv ifcfg-ens33 ifcfg-eth0
输入vim /etc/default/grub编辑文件(编辑文件前最好备份),GRUB_CMDLINE_LINUX里添加“net.ifnames=0 biosdevname=0 ”参数
vim /etc/default/grub
"net.ifnames=0 biosdevname=0"
输入grub2-mkconfig -o /boot/grub2/grub.cfg
grub2-mkconfig -o /boot/grub2/grub.cfg
重启命令:shutdown或reboot
shutdown
reboot
停止防火墙
systemctl stop firewalld.service
关闭开机自动启动防火墙
systemctl disable firewalld.service
查看防火墙状态
service firewalld.service status
setenforce 0
vim /etc/selinux/config
停止NetworkManager
systemctl stop NetworkManager
停止NetworkManager开机自启动
systemctl disable NetworkManager
rm -rf /var/lib/NetworkManager/NetworkManager.state /etc/NetworkManager/nm-system-settings.conf
查看防火墙状态
service NetworkManager status
reboot
yum install -y centos-release-openstack-queens
yum-config-manager --enable openstack-queens
vim /etc/yum.conf
sslverifv=0
cd /etc/yum.repos.d/
保留3个repo,分别为CentOS-Base,Centos-OpenStack-queens,CentOS-QEMU-EV。
并修改CentOS-Base、CentOS-QEMU-EV中内容为
CentOS-Base.repo下
[base]
name=centos-7-base
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/7/os/x86_64/
gpgcheck=0
enabled=1
[updates]
name=centos-7-updates
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/7/updates/x86_64/
gpgcheck=0
enabled=1
[extras]
name=centos-7-extras
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/7/extras/x86_64/
gpgcheck=0
enabled=1
[centosplus]
name=centos-7-centosplus
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/7/centosplus/x86_64/
gpgcheck=0
enabled=1
CentOS-QEMU-EV.repo下
[centos-qemu-ev]
name=CentOS-$releasever - QEMU EV
baseurl=http://mirrors.tuna.tsinghua.edu.cn/centos/7/virt/x86_64/kvm-common/
gpgcheck=0
enabled=1
yum clean all
yum makecache
yum repolist
cat /proc/version
yum -y update
cat /proc/version
reboot
cat /proc/version && cat /etc/redhat-release
yum install -y openstack-packstack
packstack allinone
配置网卡文件
ifconfig
cd /etc/sysconfig/network-scripts/
cp ifcfg-eth0 ifcfg-br-ex
vim ifcfg-br-ex
TYPE=Ethernet
BOOTPROTO=none
NAME=br-ex
DEVICE=br-ex
ONBOOT=yes
IPADDR=172.24.4.1
PREFIX=24
保存后退出
reboot
在浏览器(虚拟机里,物理机里都可以)地址栏中输入:http://192.168.20.16/dashboard
cd #将root用户家目录切换至当前工作目录
cat keystonerc_admin
上一行的命令结果中:
export OS_USERNAME=admin
export OS_PASSWORD=这里的就是密码