OpenStack-T版四项基础服务(SQL;message;memcached;etcd)

2022/8/9 2:23:40

本文主要是介绍OpenStack-T版四项基础服务(SQL;message;memcached;etcd),对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

数据库

安装软件包

#yum install mariadb mariadb-server python2-PyMySQL -y

修改配置文件

#vim /etc/my.cnf.d/openstack.cnf

[mysqld] bind-address = 192.168.100.147

default-storage-engine = innodb

innodb_file_per_table = on

max_connections = 4096

collation-server = utf8_general_ci

character-set-server = utf8

完成安装启动服务

#systemctl restart mariadb.service
#systemctl enable mariadb.service

img

初始化数据库

#mysql_secure_installation

Enter current password for root (enter for none): 回车

Set root password? [Y/n] y

New password: 000000

Re-enter new password:

Remove anonymous users? [Y/n] y

Disallow root login remotely? [Y/n] n

Remove test database and access to it? [Y/n] y

Reload privilege tables now? [Y/n] y

img


消息队列 Rabbitmq

安装软件包

#yum install rabbitmq-server -y

启动消息队列服务并将其配置为在系统引导时启动:

#systemctl enable rabbitmq-server.service
#systemctl restart rabbitmq-server.service
#systemctl status rabbitmq-server.service

img

添加用户:openstack

#rabbitmqctl add_user openstack 000000

允许用户的配置、写入和读取访问权限:openstack

#rabbitmqctl set_permissions openstack ".*" ".*" ".*"

img

查看rebbitmq的监听端口:5672

#yum install net‐tools -y
#netstat  -antp | grep 5672

img


缓存服务(Memcached)

安装软件包

#yum install memcached python-memcached -y

修改配置文件

#vim **/etc/sysconfig/memcached**

OPTIONS="-l 127.0.0.1,::1,controller"

img

设置开机自启

#systemctl restart memcached.service
#systemctl enable memcached.service
#systemctl status memcached.service

img


Etcd 服务

安装软件包

#yum install etcd -y

修改配置文件

#vim  /etc/etcd/etcd.conf

#[Member]

ETCD_DATA_DIR="/var/lib/etcd/default.etcd"

ETCD_LISTEN_PEER_URLS="http://192.168.100.147:2380"

ETCD_LISTEN_CLIENT_URLS="http://192.168.100.147:2379"

ETCD_NAME="controller"

#[Clustering]

ETCD_INITIAL_ADVERTISE_PEER_URLS="http://192.168.100.147:2380" ETCD_ADVERTISE_CLIENT_URLS="http://192.168.100.147:2379" ETCD_INITIAL_CLUSTER="controller=http://192.168.100.147:2380"

ETCD_INITIAL_CLUSTER_TOKEN="etcd-cluster-01"

ETCD_INITIAL_CLUSTER_STATE="new"

img

完成安装设置开机自启

#systemctl enable etcd
#systemctl restart etcd
#systemctl status etcd

img



这篇关于OpenStack-T版四项基础服务(SQL;message;memcached;etcd)的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!


扫一扫关注最新编程教程