openstack搭建之-基础服务配置(15)

Posted chenli90

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了openstack搭建之-基础服务配置(15)相关的知识,希望对你有一定的参考价值。

 

基础环境准备,所需服务器及说明

  172.16.2.51     base.test.com    基础服务节点

  172.16.2.52     ctrl.test.com     控制节点   

  172.16.2.53     com1.test.com    计算节点

  172.16.2.54     cin1.test.com      存储节点

 

一、 NTP Server

1、编辑配置文件:vim /etc/chrony.conf

allow 172.16.2.0/16         #允许同步时间的子网为172.16.2.0/16
local stratum 10            #本地时钟提供服务

2、启动服务:systemctl restart chronyd

  systemctl enable chronyd

3、查看同步信息:chronyc sources -v

二、、 DNS Server

  172.16.2.51     base.test.com

  172.16.2.52     ctrl.test.com

  172.16.2.53     com1.test.com

  172.16.2.54     cin1.test.com

1、安装软件并修改配置文件

  yum install bind -y

  cp /etc/named.conf /etc/named.conf.bak

  vim /etc/named.conf

options {
        listen-on port 53 { any; };
        directory       "/var/named";
        dump-file       "/var/named/data/cache_dump.db";
        allow-query     { any; };
};
zone "test.com" IN {
       type master;
file "test.db";
};

2、编辑解析文件test.db

  cd /var/named ,备份cp named.empty test.db

  vim test.db

$TTL 3H
@       IN SOA  base.test.com. root.base.test.com. (
                                        0       ; serial
                                        1D      ; refresh
                                        1H      ; retry
                                        1W      ; expire
                                        3H )    ; minimum
@         NS      base.test.com.
base      A       172.16.2.51
ctrl      A       172.16.2.52
com1     A       172.16.2.53
cin1      A       172.16.2.54

  chown named. test.db

3、开启DNS服务

  systemctl restart named

  systemctl enable named

  systemctl status named

三、DB SQL

1、安装软件

  yum install mariadb mariadb-server python2-Pymysql -y

2、编辑配置文件

  vim /etc/my.cnf.d/chen.cnf

[mysqld]
bind-address=172.16.2.51
default-storage-engine = innodb
innodb_file_per_table = on
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8

3、开启Mariadb服务

  systemctl restart mariadb.service

  systemctl enable mariadb.service

  systemctl status mariadb.service

4、初始化数据库并查看用户信息

  mysql_secure_installation

  select user,host from mysql.user;

四、RabbitMQ

1、安装软件并启动服务

  yum install rabbitmq-server

  systemctl restart rabbitmq-server.service

  systemctl enable rabbitmq-server.service

2、增加用户并设置权限

  rabbitmqctl add_user openstack RABBIT_PASS

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

3、开启web管理

  rabbitmq-plugins enable rabbitmq_management

  登录:http://172.16.2.51:15672

  用户:guest

  密码:guest

五、 Memcached

1、安装软件

  yum install memcached python-memcached -y

2、编辑配置文件

  vim /etc/sysconfig/memcached

PORT="11211"
USER="memcached"
MAXCONN="1024"
CACHESIZE="64"
OPTIONS="-l 127.0.0.1,::1,base.test.com"

3、开启服务

  systemctl restart memcached.service

  systemctl enable memcached.service

  systemctl status memcached.service

 


以上是关于openstack搭建之-基础服务配置(15)的主要内容,如果未能解决你的问题,请参考以下文章

Centos 7 搭建OpenStack 私有云——基础环境配置

Flutter 基础组件之 Scaffold

openstack搭建之-keystone配置(16)

OpenStack---M版---双节点搭建---基础环境配置

云计算之openstack-newton版搭建

云计算之openstack-newton版搭建