建議使用以下配置(以VMware Workstation為例):
控制節(jié)點(diǎn)(Controller Node)
- CPU:4核心或以上
- 內(nèi)存:8GB或以上
- 磁盤:100GB(系統(tǒng)盤)+ 100GB(存儲(chǔ))
- 網(wǎng)絡(luò):兩張網(wǎng)卡(管理網(wǎng)絡(luò)+外部網(wǎng)絡(luò))
計(jì)算節(jié)點(diǎn)(Compute Node)
- CPU:4核心或以上(支持虛擬化)
- 內(nèi)存:16GB或以上
- 磁盤:100GB系統(tǒng)盤 + 200GB數(shù)據(jù)盤
- 網(wǎng)絡(luò):兩張網(wǎng)卡
推薦使用CentOS 7或Ubuntu 20.04 LTS。以下以CentOS 7為例:
1. 下載CentOS 7鏡像并創(chuàng)建虛擬機(jī)
2. 安裝時(shí)選擇最小化安裝(Minimal Install)
3. 配置網(wǎng)絡(luò):`bash
# 編輯網(wǎng)絡(luò)配置文件
vi /etc/sysconfig/network-scripts/ifcfg-ens33
BOOTPROTO=static
ONBOOT=yes
IPADDR=192.168.100.10
NETMASK=255.255.255.0
GATEWAY=192.168.100.1
DNS1=8.8.8.8`
`bash
# 更新系統(tǒng)
sudo yum update -y
sudo yum install -y vim wget curl net-tools git
sudo yum install -y centos-release-openstack-ussuri
sudo yum update -y
sudo yum install -y python-openstackclient openstack-selinux`
sudo yum install -y mariadb mariadb-server python2-PyMySQL
創(chuàng)建配置文件:`bash
sudo vi /etc/my.cnf.d/openstack.cnf`
添加以下內(nèi)容:`ini
[mysqld]
bind-address = 192.168.100.10
default-storage-engine = innodb
innodbfilepertable = on
maxconnections = 4096
collation-server = utf8generalci
character-set-server = utf8`
`bash
# 啟動(dòng)服務(wù)
sudo systemctl enable mariadb
sudo systemctl start mariadb
sudo mysqlsecureinstallation`
sudo yum install -y rabbitmq-server
`bash
# 啟動(dòng)服務(wù)
sudo systemctl enable rabbitmq-server
sudo systemctl start rabbitmq-server
sudo rabbitmqctl adduser openstack OPENSTACKPASS
sudo rabbitmqctl set_permissions openstack "." "." ".*"`
sudo yum install -y memcached python-memcached
`bash
# 編輯配置文件
sudo vi /etc/sysconfig/memcached
OPTIONS="-l 127.0.0.1,::1,192.168.100.10"
sudo systemctl enable memcached
sudo systemctl start memcached`
`bash
mysql -u root -p
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone. TO 'keystone'@'localhost' IDENTIFIED BY 'KEYSTONE_DBPASS';
GRANT ALL PRIVILEGES ON keystone. TO 'keystone'@'%' IDENTIFIED BY 'KEYSTONE_DBPASS';
FLUSH PRIVILEGES;
EXIT;`
sudo yum install -y openstack-keystone httpd mod_wsgi
`bash
# 編輯配置文件
sudo vi /etc/keystone/keystone.conf
[database]
connection = mysql+pymysql://keystone:KEYSTONE_DBPASS@controller/keystone
[token]
provider = fernet`
sudo su -s /bin/sh -c "keystone-manage db_sync" keystone
keystone-manage fernet_setup --keystone-user keystone --keystone-group keystone
keystone-manage credential_setup --keystone-user keystone --keystone-group keystone

說明:管理網(wǎng)絡(luò)使用NAT模式,外部網(wǎng)絡(luò)使用橋接模式

說明:建議使用LVM分區(qū),便于后續(xù)擴(kuò)展

說明:根據(jù)實(shí)際需求調(diào)整資源分配
`bash
# 檢查數(shù)據(jù)庫服務(wù)
sudo systemctl status mariadb
sudo systemctl status rabbitmq-server
sudo systemctl status memcached`
`bash
# 設(shè)置管理員環(huán)境變量
export OSUSERNAME=admin
export OSPASSWORD=ADMINPASS
export OSPROJECTNAME=admin
export OSUSERDOMAINNAME=Default
export OSPROJECTDOMAINNAME=Default
export OSAUTHURL=http://controller:5000/v3
export OSIDENTITYAPIVERSION=3
openstack token issue`
`bash
# 測試數(shù)據(jù)庫連接
mysql -h controller -u keystone -p`
完成基礎(chǔ)服務(wù)安裝后,可以繼續(xù)安裝以下服務(wù):
本教程基于OpenStack Ussuri版本,其他版本可能略有差異
截圖僅為示例,實(shí)際配置請(qǐng)根據(jù)環(huán)境調(diào)整
如若轉(zhuǎn)載,請(qǐng)注明出處:http://www.gzhuanai.com/product/56.html
更新時(shí)間:2026-05-12 04:54:51