openstack简单安装--环境准备

本文详细介绍如何在两台机器上配置OpenStack环境,包括Controller节点和Compute节点的设置过程。涉及网络配置、关闭防火墙及SELinux、安装必要软件包、数据库配置等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

两台机器controller节点mcon compute节点mcom
两台机器都配置:

vim /etc/hosts
192.168.139.251 mcon
192.168.139.252 mcom


vim /etc/sysconfig/network-scripts/ifcfg-eth0

NAME="eth0"
DEVICE="eth0"
ONBOOT="yes"
NM_CONTROLLED=yes
BOOTPROTO=none
BRIDGE=br0



vim /etc/sysconfig/network-scripts/ifcfg-br0

DEVICE=br0
TYPE=Bridge
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=192.168.139.252 //本机IP
NETMASK=255.255.240.0
GATEWAY=192.168.128.1
DNS1=114.114.114.114


关闭防火墙服务
systemctl stop firewalld.service
systemctl disable firewalld.service



vim /etc/hostname
controller(compute)//本机域名


关闭selinux
vim /etc/selinux/config
SELINUX=disabled



yum install centos-release-openstack-mitaka -y
yum install https://rdoproject.org/repos/rdo-release.rpm -y
yum upgrade -y
yum install python-openstackclient -y
yum install openstack-selinux -y
yum install mariadb mariadb-server python2-PyMySQL -y



以下只在controller节点配置

配置数据库
vim /etc/my.cnf.d/mariadb-server.cnf
bind-address = 192.168.139.251
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8

systemctl enable mariadb.service
systemctl start mariadb.service


yum install mongodb-server mongodb -y

vim /etc/mongod.conf
bind_ip = 192.168.139.251
smallfiles = true

systemctl enable mongod.service
systemctl start mongod.service


yum install rabbitmq-server -y
systemctl enable rabbitmq-server.service
systemctl start rabbitmq-server.service
rabbitmqctl add_user openstack zouhuiying
rabbitmqctl set_permissions openstack ".*" ".*" ".*"


yum install memcached python-memcached -y
systemctl enable memcached.service
systemctl start memcached.service
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值