DBA技术栈前置验收操作

33 阅读1分钟

一、DBA技术栈前置要求

  1. 系统os kernel

初始化的主机OS需包含如下两部分参数信息

#YumChina Default Config                                                                                         
fs.file-max=4194304                                                                                              
fs.nr_open=5242880                                                                                               
net.ipv4.ip_forward=0                                                                                            
                                                                                 
#YumChina Security                                                                                               
net.ipv4.conf.all.log_martians=1                                                                                 
net.ipv4.conf.default.log_martians=1                                                                             
net.ipv6.conf.all.disable_ipv6=1                                                                                 
net.ipv6.conf.default.disable_ipv6=1                                                           
vm.swappiness = 1

2. ## 数据盘

  • SSD磁盘
  • 数据盘LVM,挂载点 /data

步骤略,套用现有的即可

  • xfs格式文件系统

步骤:

# 格式化和挂载
mkfs.xfs /dev/vg_data/lv_data -f

vim /etc/fstab
# 注意标黄的 xfs
/dev/vg_data/lv_data     /data xfs defaults,usrquota,grpquota 1 2

检查:

mount | grep /data

# output:
# 应该是xfs,而不是ext4

  • 磁盘IOPS
fio -filename=$filename -direct=1 -iodepth 1 -thread -rw=randrw -ioengine=psync -bs=4k -size=20G -numjobs=10 -runtime=10 -group_reporting -name=mytest


# output:

write:IOPS=70.7K # 判断该值大于10000IOPS即通过,小于即返回

  1. DNS

nslookup www.baidu.com
# 返回www.a.shifen.com即通过

nslookup dmp1.hwwt2.com
# 返回172.21.32.97即通过

  1. ntp

  • NTP服务是否自启动
  • 当前时区:Asia/Shanghai
  • 时间准确
# timedatectl

NTP enbaled 返回yes即通过
Time zone 返回Asia/Shanghai即通过




二、技术栈特定规范

  1. MySQL

  1. Redis

  1. MongoDB/ES

/etc/security/limits.conf 文件

ES与mongo技术栈对文件

#                                                                                                                             
* hard core 0                                                                                                                 
* soft nproc 65535                                                                                                            
* hard nproc 65535                                                                                                            
* soft nofile 1048576                                                                                                         
* hard nofile 1048576  

XFS

  1. ……




三、补充