openstack O版 基础环境的搭建

发布时间:2020-07-12 17:47:07 作者:fxhlj
来源:网络 阅读:666

配置说明:
controller IP:192.168.0.111
Compute IP: 192.168.0.112
1.网络配置.
Controller
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.0.111
PREFIX0=24
GATEWAY=192.168.0.254
DNS1=192.168.0.254
Compute
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.0.112
PREFIX0=24
GATEWAY=192.168.0.254
DNS1=192.168.0.254
关闭两台服务器的iptables 和 selinux
(1)关闭防火墙
systemctl stop firewalld.service
systemctl disable firewalld.service
(2)关闭selinux
setenforce 0
[root@compute ~]# setenforce 0
[root@compute ~]# cat /etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted
2.NTP服务的搭建
Controller
安装chrony时间同步服务(系统默认是安装),如果没有安装就安装。
[root@controller ~]# rpm -qa | grep chrony
chrony-2.1.1-4.el7.centos.x86_64
[root@controller ~]#yum -y install chrony
[root@controller ~]# vi /etc/chrony.conf
安装好后,需要修改配置文件,如下所示:
openstack O版  基础环境的搭建
启动ntp服务
[root@controller ~]# systemctl start chronyd.service 启动ntp服务
[root@controller ~]# systemctl status chronyd.service 查看时间同步状态
[root@controller ~]# chronyc sources -v 查看时间同步源
[root@controller ~]# chronyc sourcestats -v 查看时间同步源状态
openstack O版  基础环境的搭建
Compute ntp的安装和部署
安装同上一样,安装好后修改配置文件
[root@compute ~]# vi /etc/chrony.conf
openstack O版  基础环境的搭建
启动服务和查看是否正常同上。
############################ controller Openstack包安装和部署##########################
一.MYSQL服务
[root@controller ~]# yum -y install mariadb mariadb-server python2-PyMySQL 安装46个包
[root@controller ~]# cd /etc/my.cnf.d/
[root@controller my.cnf.d]# vi mariadb-openstack.cnf
[root@controller my.cnf.d]# cat mariadb-openstack.cnf
[mysqld]
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
bind-address = 192.168.0.111
[root@controller ~]# systemctl enable mariadb.service
[root@controller ~]# systemctl start mariadb.service
[root@controller ~]# netstat -anpult | grep mysqld
tcp 0 0 192.168.0.111:3306 0.0.0.0: LISTEN 2990/mysqld
初始化数据库
[root@controller ~]# mysql_secure_installation
Enter current password for root (enter for none): 选择回车
Set root password? [Y/n] y
设置密码及初始化
密码 devops ,一路y回车
[root@controller ~]# mysql -uroot -pdevops
创建数据库
[root@controller ~]# mysql -uroot -pdevops
openstack O版  基础环境的搭建
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 12
Server version: 10.1.20-MariaDB MariaDB Server
Copyright (c) 2000, 2016, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE keystone;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.
TO 'keystone'@'localhost' IDENTIFIED BY 'devops';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone. TO 'keystone'@'%' IDENTIFIED BY 'devops';
二.RabbitMQ服务的安装
[root@controller ~]# yum -y install erlang
[root@controller ~]# yum install -y rabbitmq-server
[root@controller ~]# systemctl enable rabbitmq-server.service
[root@controller ~]# systemctl start rabbitmq-server.service
[root@controller ~]# systemctl status rabbitmq-server.service
[root@controller ~]# systemctl list-unit-files |grep rabbitmq-server.service
[root@controller ~]# rabbitmqctl add_user openstack devops 用户名为:openstack 密码:devops
Creating user "openstack" ...
[root@controller ~]# rabbitmqctl set_user_tags openstack administrator 设置openstack为管理员
Setting tags for user "openstack" to [administrator] ...
[root@controller ~]# rabbitmqctl set_permissions openstack ".
" "." "."
Setting permissions for user "openstack" in vhost "/" ...
[root@controller ~]# rabbitmq-plugins list 查看支持的插件
[root@controller ~]# rabbitmq-plugins enable rabbitmq_management 启动插件
Plugin configuration unchanged.
Applying plugin configuration to rabbit@controller... started 6 plugins.
[root@controller ~]# systemctl restart rabbitmq-server.service
[root@controller ~]# lsof -i :15672
测试rabbitMQ是否正常
openstack O版  基础环境的搭建

所有的配置文件在百度云盘中:
链接:https://pan.baidu.com/s/1CnmKkFMTemv199ctgb5Oig
提取码:27om
复制这段内容后打开百度网盘手机App,操作更方便哦

推荐阅读:
  1. OpenStack Train版双节点安装(一)
  2. Openstack(一):基础环境配置及介绍

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

openstack基础服务的搭建 openstack o版 st

上一篇:Java注解(Annotation):请不要小看我!

下一篇:javascript与php注册自己的“事件”

相关阅读

您好,登录后才能下订单哦!

密码登录
登录注册
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》