2023年12月21日

Openstack一键安装

作者 高劲松

[root@openstack ~]# cat install_openstack.sh

!/bin/bash

yum update
yum install -y wget

使用wget命令下载

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum update
注意:如果没有wget命令,请使用下面的命令
yum install -y vim

设置主机名为openstack

hostnamectl set-hostname openstack

切换到bash脚本

bash

禁用防火墙

systemctl disable firewalld

停止防火墙

systemctl stop firewalld

禁用网络管理器

systemctl disable NetworkManager

停用网络管理器

systemctl Stop NetworkManager

开机启动

systemctl enable network

启动网络

systemctl start network
yum update
yum clean all
yum repolist all
yum install -y centos-release-openstack-stein
yum install -y openstack-packstack
yum update
packstack –allinone
clear
echo “提醒你,您已经安装好了!”
[root@openstack ~]#