OpenStack-T版基础环境配置

OpenStack 环境配置

注意其中compute节点中根目录一定要大!!,controller节点根分区给予50-100G即可下图所示

 

基础环境配置

所有节点修改主机名

controller

[root@localhost ~]# hostnamectl set-hostname controller
[root@localhost ~]# bash
[root@controller ~]#

compute

[root@localhost ~]# hostnamectl set-hostname compute
[root@localhost ~]# bash
[root@compute ~]#

所有节点关闭防火墙

controller+compute

[root@controller ~]# systemctl stop firewalld
[root@controller ~]# systemctl disable firewalld
[root@controller ~]# setenforce 0
[root@controller ~]# sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config

所有节点配置hosts

controller+compute

[root@controller ~]# vi /etc/hosts
192.168.1.100 controller
192.168.1.200 compute

生成ssh公钥

controller

[root@controller ~]# ssh-keygen -t rsa
[root@ct ~]# ssh-copy-id compute

 

安装openstack-T版源

controller+computet相同操作

[root@controller ~]# yum install centos-release-openstack-train -y
[root@controller ~]# yum upgrade -y 
[root@controller ~]# yum install python-openstackclient -y
[root@controller ~]# yum install openstack-selinux -y

 

Chrony时间服务

controller节点配置

安装服务软件

[root@controller ~]# yum install chrony -y

编辑配置文件

[root@controller ~]# vi /etc/chrony.conf

注释多余的,并选择阿里云做时间同步

重启服务

[root@controller ~]# systemctl enable chronyd
[root@controller ~]# systemctl restart chronyd

验证

[root@controller ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample 
===============================================================================
^* 203.107.6.88           2  6    17    50    -1277us[-2897us] +/- 35ms
[root@controller ~]# date
Tue Feb 8 22:22:58 CST 2022

compute节点配置

安装服务软件

[root@compute ~]# yum install chrony -y

编辑配置文件

[root@controller ~]# vi /etc/chrony.conf

选择controllrer做时间同步,并注释多余的

重启服务并验证

[root@compute ~]# systemctl enable chronyd
[root@compute ~]# systemctl restart chronyd
[root@compute ~]# chronyc sources
210 Number of sources = 1
MS Name/IP address Stratum Poll Reach LastRx Last sample 
===============================================================================
^* controller            3    6    377     24     +169us[ -165us] +/- 30ms

 

controller节点配置

Mariadb数据库

安装服务软件

[root@controller ~]# yum -y install mariadb mariadb-server python2-PyMySQL
[root@controller ~]# yum -y install libibverbs

添加MySQL子配置文件

[root@controller ~]# vi /etc/my.cnf.d/openstack.cnf
添加以下内容
[mysqld]
bind-address=192.168.1.100                #控制节点局域网地址
default-storage-engine=innodb             #默认存储引擎
innodb_file_per_table=on                  #每张表独立表空间文件
max_connections=4096                      #最大连接数
collation-server=utf8_general_ci          #默认字符集,不区分大小写
character-set-server=utf8

启动服务

[root@controller ~]# systemctl enable mariadb
[root@controller ~]# systemctl start mariadb

执行安全配置脚本

[root@controller ~]# mysql_secure_installation

 

RabbitMQ

安装服务软件

[root@controller ~]#  yum -y install rabbitmq-server

启动服务

[root@controller ~]# systemctl enable rabbitmq-server.service
[root@controller ~]# systemctl start rabbitmq-server.service

创建消息队列用户openstack,密码000000,用于controler和node节点连接rabbitmq的认证

[root@controller ~]# rabbitmqctl add_user openstack 000000

配置openstack用户的操作权限(正则,配置读写权限)

[root@controller ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"

验证端口是否开起来,5672是Rabbitmq默认端口,25672是Rabbit的测试工具CLI的端口

[root@controller ~]# yum -y install net-tools
[root@controller ~]# netstat -tnlup | grep 5672

 

Memcached

安装memcached是用于存储session信息;服务身份验证机制使用Memcached来缓存令牌 在登录openstack的dashboard时,会产生一些session信息,这些session信息会存放到memcached中

安装服务软件

[root@controller ~]# yum install -y memcached python-memcached

修改服务配置文件

[root@controller ~]# vi /etc/sysconfig/memcached

启动服务,验证端口是否开起来

[root@controller ~]# systemctl enable memcached
[root@controller ~]# systemctl start memcached
[root@controller ~]# netstat -nautp | grep 11211

 

Etcd

安装服务

[root@controller ~]# yum -y install etcd

编辑服务配置文件

[root@controller ~]# vi /etc/etcd/etcd.conf

启动服务,验证端口是否开起来

[root@controller ~]# systemctl enable etcd.service
[root@controller ~]# systemctl start etcd.service
[root@controller ~]# netstat -anutp |grep 2379

 [root@controller ~]# netstat -anutp |grep 2380

作者: 红烧悠鸽
本文采用 CC BY-NC-SA 4.0 协议
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇