您好,登錄后才能下訂單哦!
配置說明:
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
安裝好后,需要修改配置文件,如下所示:
啟動ntp服務
[root@controller ~]# systemctl start chronyd.service 啟動ntp服務
[root@controller ~]# systemctl status chronyd.service 查看時間同步狀態
[root@controller ~]# chronyc sources -v 查看時間同步源
[root@controller ~]# chronyc sourcestats -v 查看時間同步源狀態
Compute ntp的安裝和部署
安裝同上一樣,安裝好后修改配置文件
[root@compute ~]# vi /etc/chrony.conf
啟動服務和查看是否正常同上。
############################ 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
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是否正常
所有的配置文件在百度云盤中:
鏈接:https://pan.baidu.com/s/1CnmKkFMTemv199ctgb5Oig
提取碼:27om
復制這段內容后打開百度網盤手機App,操作更方便哦
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。