The Construction of basic Environment of openstack O Edition
Configuration instructions:
Controller IP:192.168.0.111
Compute IP: 192.168.0.112
1. Network configuration.
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
Shut down iptables and selinux on both servers
(1) turn off the firewall
Systemctl stop firewalld.service
Systemctl disable firewalld.service
(2) close selinux
Setenforce 0
[root@compute ~] # setenforce 0
[root@compute ~] # cat / etc/selinux/config
SELINUX=disabled
SELINUXTYPE=targeted
Construction of 2.NTP Service
Controller
Install the chrony time synchronization service (the system defaults to installation), or install it if it is not installed.
[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
After installation, you need to modify the configuration file, as follows:
Start the ntp service
[root@controller ~] # systemctl start chronyd.service starts the ntp service
[root@controller ~] # systemctl status chronyd.service to view time synchronization status
[root@controller ~] # chronyc sources-v View time synchronization sources
[root@controller ~] # chronyc sourcestats-v View time synchronization Source status
Installation and deployment of Compute ntp
Install the same as above, modify the configuration file after installation
[root@compute ~] # vi / etc/chrony.conf
Start the service and see if it is working as above.
# # installation and deployment of controller Openstack package # #
I. MySQL service
[root@controller ~] # yum-y install mariadb mariadb-server python2-PyMySQL install 46 packages
[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
Initialize the database
[root@controller ~] # mysql_secure_installation
Enter current password for root (enter for none): select enter
Set root password? [Y/n] y
Set password and initialize
Password devops, enter y all the way.
[root@controller] # mysql-uroot-pdevops
Create a database
[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'
II. Installation of RabbitMQ service
[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 user name is: openstack password: devops
Creating user "openstack"...
[root@controller ~] # rabbitmqctl set_user_tags openstack administrator sets openstack as administrator
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 View supported plug-ins
[root@controller ~] # rabbitmq-plugins enable rabbitmq_management launch plug-in
Plugin configuration unchanged.
Applying plugin configuration to rabbit@controller... Started 6 plugins.
[root@controller ~] # systemctl restart rabbitmq-server.service
[root@controller] # lsof-I: 15672
Test whether the rabbitMQ is normal
All the configuration files are in Baidu Cloud disk:
Link: https://pan.baidu.com/s/1CnmKkFMTemv199ctgb5Oig
Extraction code: 27om
After copying this content, open the Baidu network disk mobile phone App, which is more convenient to operate.