openstack v版 centos stream 8 手工搭建——基础环境搭建(一)
本文最后更新于76 天前,其中的信息可能已经过时,如有错误请发送邮件到2639131093@qq.com

注意

1.本教程为openstack 搭建平台victoria 版,虚拟机为centos stream 8

2.本教程设计内容非常多,很复杂,但也很有技巧,请注意每一步,我说可以更改的地方可以更改,其余建议和我一样

3.内容板块大体包括:基础环境设置, keystone组建安装,glance组建安装,placement组建安装,nova组建安装,neutron组建安装,dashboard组建安装

4.密码约定:本文所有和数据库及消息队列相关的密码统一设定 rootroot,openstack 组件用户密码统一设定 redhat

5.学习此章节,你需要了解的知识:数据库sql中dcl用户管理的知识,linux基础命令,openstack基础命令

6.官方网址:

Environment — Installation Guide documentation (openstack.org)

7.环境配置:

环境用到 2台 虚拟机,单网卡,并为其配置 静态 IP 及 DNS

主机名ip网关DNScpu/内存磁盘角色备注
controller192.168.100.128192.168.100.2114.114.114.1144c/6g100g控制节点开启虚拟化引擎
compute192.168.100.129192.168.100.2114.114.114.1144c/6g100g计算节点开启虚拟化引擎

系统环境配置

网络配置(所有节点)

请注意,当前环境中控制节点及计算节点网卡类型为 NAT

网卡配置

[root@controller ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens160 
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=eui64
NAME=ens160
UUID=692f158b-7895-4251-bb1c-5b929a402012
DEVICE=ens160
ONBOOT=yes
IPADDR=192.168.100.128
PREFIX=24
GATEWAY=192.168.100.2
DNS1=114.114.114.114
[root@compute ~]# cat /etc/sysconfig/network-scripts/ifcfg-ens160 
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=eui64
NAME=ens160
UUID=692f158b-7895-4251-bb1c-5b929a402012
DEVICE=ens160
ONBOOT=yes
IPADDR=192.168.100.129
PREFIX=24
GATEWAY=192.168.100.2
DNS1=114.114.114.114

关闭防火墙

systemctl stop firewalld
systemctl disable firewalld

关闭selinux

setenforce 0
sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config
##重启

关闭NetworkManager

systemctl stop NetworkManager
systemctl disable NetworkManager

HOSTS 配置(所有节点)

echo '192.168.100.128 controller' >> /etc/hosts
echo '192.168.100.129 compute' >> /etc/hosts

配置时钟同步(所有节点)

vim /etc/chrony.conf

##添加配置
# Use public servers from the pool.ntp.org project.
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# pool 2.centos.pool.ntp.org iburst
server ntp.aliyun.com iburst

##启动服务 
systemctl start chronyd.service
systemctl enable chronyd.service

配置在线yum源(所有节点)

cd /etc/yum.repos.d/
mkdir bak
mv *.repo bak/
vim chencuo.repo      ##光盘名可以自己定

##复制以下内容
[highavailability]
name=CentOS Stream 8 - HighAvailability
baseurl=https://mirrors.aliyun.com/centos/8-stream/HighAvailability/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=0
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1
 
[nfv]
name=CentOS Stream 8 - NFV
baseurl=https://mirrors.aliyun.com/centos/8-stream/NFV/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=0
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1
 
[rt]
name=CentOS Stream 8 - RT
baseurl=https://mirrors.aliyun.com/centos/8-stream/RT/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=0
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1
 
[resilientstorage]
name=CentOS Stream 8 - ResilientStorage
baseurl=https://mirrors.aliyun.com/centos/8-stream/ResilientStorage/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=0
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1
 
[extras-common]
name=CentOS Stream 8 - Extras packages
baseurl=https://mirrors.aliyun.com/centos/8-stream/extras/x86_64/extras-common/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Extras-SHA512
gpgcheck=0
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1
 
[extras]
name=CentOS Stream $releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/$contentdir/$stream/extras/$basearch/os/
baseurl=https://mirrors.aliyun.com/centos/8-stream/extras/x86_64/os/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
 
[centos-ceph-pacific]
name=CentOS - Ceph Pacific
baseurl=https://mirrors.aliyun.com/centos-vault/8-stream/storage/x86_64/ceph-pacific/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Storage
 
[centos-rabbitmq-38]
name=CentOS-8 - RabbitMQ 38
baseurl=https://mirrors.aliyun.com/centos-vault/8-stream/messaging/x86_64/rabbitmq-38/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Messaging
 
[centos-nfv-openvswitch]
name=CentOS Stream 8 - NFV OpenvSwitch
baseurl=https://mirrors.aliyun.com/centos-vault/8-stream/nfv/x86_64/openvswitch-2/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-NFV
module_hotfixes=1
 
[baseos]
name=CentOS Stream 8 - BaseOS
baseurl=https://mirrors.aliyun.com/centos/8-stream/BaseOS/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=0
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1
 
[appstream]
name=CentOS Stream 8 - AppStream
baseurl=https://mirrors.aliyun.com/centos/8-stream/AppStream/x86_64/os/
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
gpgcheck=0
repo_gpgcheck=0
metadata_expire=6h
countme=1
enabled=1
 
[centos-openstack-victoria]
name=CentOS 8 - OpenStack victoria
baseurl=https://mirrors.aliyun.com/centos/8-stream/cloud/x86_64/openstack-victoria/
#baseurl=https://repo.huaweicloud.com/centos/8-stream/cloud/x86_64/openstack-yoga/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-SIG-Cloud
module_hotfixes=1
 
[powertools]
name=CentOS Stream 8 - PowerTools
#mirrorlist=http://mirrorlist.centos.org/?release=$stream&arch=$basearch&repo=PowerTools&infra=$infra
baseurl=https://mirrors.aliyun.com/centos/8-stream/PowerTools/x86_64/os/
gpgcheck=0
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

安装基础包(所有节点)

yum install -y vim net-tools bash-completion chrony.x86_64 centos-release-openstack-victoria.noarch 
## net-tools:基本的网络工具,bash-completion:为 Bash 命令行提供自动补全功能,chrony.x86_64:时间同步,centos-release-openstack-victoria.noarch :OpenStack Victoria 软件及依赖

不一样展示 太多

已升级:
  chrony-4.5-1.el8.x86_64                                                       
已安装:
  apr-1.6.3-12.el8.x86_64                                                       
  apr-util-1.6.1-9.el8.x86_64                                                   
  apr-util-bdb-1.6.1-9.el8.x86_64                                               
  apr-util-openssl-1.6.1-9.el8.x86_64                                           
  centos-logos-httpd-85.8-2.el8.noarch                                          
  centos-release-advanced-virtualization-1.0-4.el8.noarch                       
  centos-release-ceph-nautilus-1.3-2.el8.noarch                                 
  centos-release-messaging-1-3.el8.noarch                                       
  centos-release-nfv-common-1-3.el8.noarch                                      
  centos-release-nfv-openvswitch-1-3.el8.noarch                                 
  centos-release-openstack-victoria-1-3.el8.noarch                              
  centos-release-rabbitmq-38-1-3.el8.noarch                                     
  centos-release-storage-common-2-2.el8.noarch                                  
  centos-release-virt-common-1-2.el8.noarch                                     
  httpd-2.4.37-64.module_el8+965+1ad5c49d.x86_64                                
  httpd-filesystem-2.4.37-64.module_el8+965+1ad5c49d.noarch                     
  httpd-tools-2.4.37-64.module_el8+965+1ad5c49d.x86_64                          
  mod_http2-1.15.7-10.module_el8+1009+c203647a.x86_64  

yum源测试

yum clean all
yum repolist all
yum install readline*

删除重复源

rm -rf CentOS-OpenStack-victoria.repo 
rm -rf CentOS-NFV-OpenvSwitch.repo 
rm -rf CentOS-Messaging-rabbitmq.repo 

vim CentOS-Advanced-Virtualization.repo 
vim CentOS-Storage-common.repo 

OpenStack 环境配置

安装 OpenStack Client(所有节点)

[root@controller ~]# yum install python3-openstackclient -y
[root@compute ~]# yum install python3-openstackclient -y

##太多不一一展示
已安装:
  git-core-2.43.0-1.el8.x86_64                                                  
  python-openstackclient-lang-5.4.0-2.el8.noarch                                
  python-oslo-i18n-lang-5.0.1-2.el8.noarch                                      
  python-oslo-log-lang-4.4.0-2.el8.noarch                                       
  python-oslo-utils-lang-4.6.1-1.el8.noarch                                     
  python3-appdirs-1.4.3-12.el8.noarch                                           
  python3-attrs-17.4.0-6.el8.noarch                                             
  python3-cffi-1.13.2-1.el8.x86_64                                              
  python3-cinderclient-7.2.2-1.el8.noarch                                       
  python3-cliff-3.4.0-1.el8.noarch                                              
  python3-cmd2-0.9.16-2.el8.noarch                                              
  python3-colorama-0.4.3-3.el8.noarch                                           
  python3-cryptography-3.2.1-7.el8.x86_64                                       
  python3-debtcollector-2.2.0-2.el8.noarch                                      
  python3-dogpile-cache-1.1.5-1.1.el8.noarch                                    
  python3-funcsigs-1.0.2-17.el8.noarch                                          
  python3-importlib-metadata-1.7.0-1.el8.noarch                                 
  python3-inotify-0.9.6-13.el8.noarch                                           
  python3-iso8601-0.1.12-3.el8.noarch                                           
  python3-jeepney-0.4.3-1.el8.noarch                                            
  python3-jmespath-0.9.0-11.el8.noarch                                          
  python3-jsonpatch-1.21-2.el8.noarch                                           
  python3-jsonpointer-1.10-11.el8.noarch                                        
  python3-keyring-21.0.0-1.el8.noarch                                           
  python3-keystoneauth1-4.2.1-2.el8.noarch                                      
  python3-keystoneclient-1:4.1.1-2.el8.noarch                                   
  python3-mako-1.0.6-14.el8.noarch                                              
  python3-markupsafe-0.23-19.el8.x86_64                                         
  python3-msgpack-1.0.0-2.el8.x86_64                                            
  python3-munch-2.5.0-3.el8.noarch                                              
  python3-netaddr-0.7.19-8.el8.noarch                                           
  python3-netifaces-0.10.6-4.el8.x86_64                                         
  python3-neutronclient-7.2.1-2.el8.noarch                                      
  python3-novaclient-1:17.2.1-1.el8.noarch                                      
  python3-openstackclient-5.4.0-2.el8.noarch                                    
  python3-openstacksdk-0.50.0-1.el8.noarch                                      
  python3-os-client-config-2.1.0-1.el8.noarch                                   
  python3-os-service-types-1.7.0-1.el8.noarch                                   
  python3-osc-lib-2.2.1-2.el8.noarch                                            
  python3-oslo-config-2:8.3.4-1.el8.noarch                                      
  python3-oslo-context-3.1.2-1.el8.noarch                                       
  python3-oslo-i18n-5.0.1-2.el8.noarch                                          
  python3-oslo-log-4.4.0-2.el8.noarch                                           
  python3-oslo-serialization-4.0.1-2.el8.noarch                                 
  python3-oslo-utils-4.6.1-1.el8.noarch                                         
  python3-packaging-20.4-1.el8.noarch                                           
  python3-pbr-5.4.3-2.el8.noarch                                                
  python3-prettytable-0.7.2-14.el8.noarch                                       
  python3-pycparser-2.14-14.el8.noarch                                          
  python3-pyparsing-2.4.6-1.el8.noarch                                          
  python3-pyperclip-1.8.0-2.el8.noarch                                          
  python3-requestsexceptions-1.4.0-2.el8.noarch                                 
  python3-rfc3986-1.4.0-3.el8.noarch                                            
  python3-secretstorage-3.1.1-4.el8.noarch                                      
  python3-simplejson-3.17.2-2.el8.x86_64                                        
  python3-stevedore-3.2.2-2.el8.noarch                                          
  python3-wcwidth-0.2.5-2.el8.noarch                                            
  python3-wrapt-1.12.1-3.el8.x86_64                                             
  python3-zipp-0.5.1-2.el8.noarch                     

安装数据库(仅控制节点)

安装数据库

[root@controller yum.repos.d]# yum install mariadb mariadb-server python2-PyMySQL -y

编辑配置文件

[root@controller ~]# vim /etc/my.cnf.d/openstack.cnf
##添加以下内容
[mysqld]
bind-address = 192.168.100.168    ##控制节点ip
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8

启动数据库服务

[root@controller ~]# systemctl start mariadb.service 
[root@controller ~]# systemctl enable mariadb.service 
Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.

初始化数据库

[root@controller ~]# mysql_secure_installation

NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.

Enter current password for root (enter for none):   ##回车  enter
OK, successfully used password, moving on...

Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.

Set root password? [Y/n] Y  ## 是否设置密码   Y
New password: 
Re-enter new password: 
Password updated successfully!
Reloading privilege tables..
 ... Success!


By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.

Remove anonymous users? [Y/n] Y  ##是否删除匿名用户  Y
 ... Success!

Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.

Disallow root login remotely? [Y/n] n  ##是否禁用root远程连接 n
 ... skipping.

By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y ##是否删除测试数据库 Y
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!

Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.

Reload privilege tables now? [Y/n] Y  ##是否现在刷新权限列表 Y
 ... Success!

Cleaning up...

All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.

Thanks for using MariaDB!

安装消息队列(仅控制节点)

安装软件包

[root@controller ~]# yum install rabbitmq-server -y
过多,不一样展示
已安装:
  SDL2-2.0.10-2.el8.x86_64                                                      
  erlang-asn1-22.3.4.1-1.el8.x86_64                                             
  erlang-common_test-22.3.4.1-1.el8.x86_64                                      
  erlang-compiler-22.3.4.1-1.el8.x86_64                                         
  erlang-crypto-22.3.4.1-1.el8.x86_64                                           
  erlang-cuttlefish-2.0.11-10.el8.noarch                                        
  erlang-debugger-22.3.4.1-1.el8.x86_64                                         
  erlang-eldap-22.3.4.1-1.el8.x86_64                                            
  erlang-erts-22.3.4.1-1.el8.x86_64                                             
  erlang-et-22.3.4.1-1.el8.x86_64                                               
  erlang-eunit-22.3.4.1-1.el8.x86_64                                            
  erlang-getopt-1.0.1-8.el8.noarch                                              
  erlang-goldrush-0.2.0-6.el8.noarch                                            
  erlang-hipe-22.3.4.1-1.el8.x86_64                                             
  erlang-inets-22.3.4.1-1.el8.x86_64                                            
  erlang-kernel-22.3.4.1-1.el8.x86_64                                           
  erlang-lager-3.8.0-2.el8.noarch                                               
  erlang-mnesia-22.3.4.1-1.el8.x86_64                                           
  erlang-mustache-0.1.1-14.el8.noarch                                           
  erlang-observer-22.3.4.1-1.el8.x86_64                                         
  erlang-os_mon-22.3.4.1-1.el8.x86_64                                           
  erlang-public_key-22.3.4.1-1.el8.x86_64                                       
  erlang-runtime_tools-22.3.4.1-1.el8.x86_64                                    
  erlang-sasl-22.3.4.1-1.el8.x86_64                                             
  erlang-sd_notify-1.0-14.1.el8.x86_64                                          
  erlang-snmp-22.3.4.1-1.el8.x86_64                                             
  erlang-ssh-22.3.4.1-1.el8.x86_64                                              
  erlang-ssl-22.3.4.1-1.el8.x86_64                                              
  erlang-stdlib-22.3.4.1-1.el8.x86_64                                           
  erlang-syntax_tools-22.3.4.1-1.el8.x86_64                                     
  erlang-tools-22.3.4.1-1.el8.x86_64                                            
  erlang-wx-22.3.4.1-1.el8.x86_64                                               
  erlang-xmerl-22.3.4.1-1.el8.x86_64                                            
  lksctp-tools-1.0.18-3.el8.x86_64                                              
  mesa-libGLU-9.0.0-15.el8.x86_64                                               
  rabbitmq-server-3.8.3-1.el8.x86_64                                            
  wxBase3-3.0.5.1-1.el8.x86_64                                                  
  wxGTK3-3.0.5.1-1.el8.x86_64                                                   
  wxGTK3-gl-3.0.5.1-1.el8.x86_64                                                
  wxGTK3-i18n-3.0.5.1-1.el8.noarch                                              

完毕!

启动服务

[root@controller ~]# systemctl start rabbitmq-server.service
[root@controller ~]# systemctl enable rabbitmq-server.service
Created symlink /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service → /usr/lib/systemd/system/rabbitmq-server.service.

添加用户

[root@controller ~]# rabbitmqctl add_user openstack rootroot  ##添加用户openstack,密码为rootroot
Adding user "openstack" ...
[root@controller ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"  ##为openstack设置匹配,读,写全权限
Setting permissions for user "openstack" in vhost "/" ...

管理页面

RabbitMQ 是一个开源的消息代理和队列服务器,实现了高级消息队列协议(AMQP).RabbitMQ 默认情况下使用两个端口号:25672和15672。默认仅开启 25672 端口,该端口通常用于内部节点通信,而不是作为客户端连接的端口。而 15672 端口是 RabbitMQ 的 Web 管理界面的默认端口。通过浏览器访问http://:15672,可以打开RabbitMQ 的管理控制台。

[root@controller ~]# netstat -utlnp |grep 5672   ##查看含5672的端口,默认开启25672
tcp        0      0 0.0.0.0:25672           0.0.0.0:*               LISTEN      36059/beam.smp      
tcp6       0      0 :::5672                 :::*                    LISTEN      36059/beam.smp      
[root@controller ~]# rabbitmq-plugins list  ##列出当前 RabbitMQ 服务器上已安装的插件
Listing plugins with pattern ".*" ...
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status: * = running on rabbit@controller
 |/
[  ] rabbitmq_amqp1_0                  3.8.3
[  ] rabbitmq_auth_backend_cache       3.8.3
[  ] rabbitmq_auth_backend_http        3.8.3
[  ] rabbitmq_auth_backend_ldap        3.8.3
[  ] rabbitmq_auth_backend_oauth2      3.8.3
[  ] rabbitmq_auth_mechanism_ssl       3.8.3
[  ] rabbitmq_consistent_hash_exchange 3.8.3
[  ] rabbitmq_event_exchange           3.8.3
[  ] rabbitmq_federation               3.8.3
[  ] rabbitmq_federation_management    3.8.3
[  ] rabbitmq_jms_topic_exchange       3.8.3
[  ] rabbitmq_management               3.8.3
[  ] rabbitmq_management_agent         3.8.3
[  ] rabbitmq_mqtt                     3.8.3
[  ] rabbitmq_peer_discovery_aws       3.8.3
[  ] rabbitmq_peer_discovery_common    3.8.3
[  ] rabbitmq_peer_discovery_consul    3.8.3
[  ] rabbitmq_peer_discovery_etcd      3.8.3
[  ] rabbitmq_peer_discovery_k8s       3.8.3
[  ] rabbitmq_prometheus               3.8.3
[  ] rabbitmq_random_exchange          3.8.3
[  ] rabbitmq_recent_history_exchange  3.8.3
[  ] rabbitmq_sharding                 3.8.3
[  ] rabbitmq_shovel                   3.8.3
[  ] rabbitmq_shovel_management        3.8.3
[  ] rabbitmq_stomp                    3.8.3
[  ] rabbitmq_top                      3.8.3
[  ] rabbitmq_tracing                  3.8.3
[  ] rabbitmq_trust_store              3.8.3
[  ] rabbitmq_web_dispatch             3.8.3
[  ] rabbitmq_web_mqtt                 3.8.3
[  ] rabbitmq_web_mqtt_examples        3.8.3
[  ] rabbitmq_web_stomp                3.8.3
[  ] rabbitmq_web_stomp_examples       3.8.3
[root@controller ~]# rabbitmq-plugins enable rabbitmq_management  ##启用 rabbitmq_management插件,开启web页面
Enabling plugins on node rabbit@controller:
rabbitmq_management
The following plugins have been configured:
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_web_dispatch
Applying plugin configuration to rabbit@controller...
The following plugins have been enabled:
  rabbitmq_management
  rabbitmq_management_agent
  rabbitmq_web_dispatch

started 3 plugins.
[root@controller ~]# netstat -utlnp |grep 5672   ##再次查看端口,必须有15672出现
tcp        0      0 0.0.0.0:15672           0.0.0.0:*               LISTEN      36059/beam.smp      
tcp        0      0 0.0.0.0:25672           0.0.0.0:*               LISTEN      36059/beam.smp      
tcp6       0      0 :::5672                 :::*                    LISTEN      36059/beam.smp  

web页面展示

默认账号密码;guest/guest

配置 Memcached 缓存系统(仅控制节点)

安装Memcached安装包

[root@controller ~]# yum install memcached python3-memcached -y
已安装:
  memcached-1.5.22-2.el8.x86_64       python3-memcached-1.58-11.el8.noarch      

完毕!

编辑配置文件

[root@controller ~]# vim /etc/sysconfig/memcached
[root@controller ~]# cat /etc/sysconfig/memcached
PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="-l 127.0.0.1,::1,controller"   ##修改此处,添加控制节点主机名

开启服务

[root@controller ~]# systemctl start memcached.service
[root@controller ~]# systemctl enable memcached.service
Created symlink /etc/systemd/system/multi-user.target.wants/memcached.service → /usr/lib/systemd/system/memcached.service.

配置 ETCD 分布式存储系统(仅控制节点)

安装软件包

um install etcd -y
已安装:
  etcd-3.2.21-2.el8.x86_64                                                      

完毕!

编辑配置文件

[root@controller ~]# vim /etc/etcd/etcd.conf
[root@controller ~]# cat | grep -v '#' /etc/etcd/etcd.conf 
ETCD_DATA_DIR="/var/lib/etcd/default.etcd"
ETCD_LISTEN_PEER_URLS="http://192.168.100.128:2380"
ETCD_LISTEN_CLIENT_URLS="http://192.168.100.128:2379"
ETCD_NAME="controller"
ETCD_INITIAL_ADVERTISE_PEER_URLS="http://192.168.100.128:2380"
ETCD_ADVERTISE_CLIENT_URLS="http://192.168.100.128:2379"
ETCD_INITIAL_CLUSTER="controller=http://192.168.100.128:2380"
ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01"
ETCD_INITIAL_CLUSTER_STATE="new"
^C

启动服务

[root@controller ~]# systemctl start etcd
[root@controller ~]# systemctl enable etcd
Created symlink /etc/systemd/system/multi-user.target.wants/etcd.service → /usr/lib/systemd/system/etcd.service.
文末附加内容

评论

发送评论 编辑评论


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