当前位置: 首页 > wzjs >正文

企业网站手机端上海谷歌推广

企业网站手机端,上海谷歌推广,赚钱项目,济南网站推广¥做下拉去118cr在数据库系统交付、迁移或上线前,执行基线核查对于保障环境稳定、安全和高效至关重要。本文基于mysql标准化实践,从操作系统层与数据库层两个维度,详尽梳理了 MySQL 的关键基线项配置方法及对应命令与预期输出,适用于运维工程师、…

在数据库系统交付、迁移或上线前,执行基线核查对于保障环境稳定、安全和高效至关重要。本文基于mysql标准化实践,从操作系统层与数据库层两个维度,详尽梳理了 MySQL 的关键基线项配置方法及对应命令与预期输出,适用于运维工程师、DBA、交付工程师等技术人员作为参考与操作手册。

一、操作系统层基线核查(Linux)

1. 磁盘空间

检查命令:

df -hP
df -i

预期输出:

数据库数据目录所在磁盘及 / 根目录的 Use% 小于 85%,inode 使用率合理,避免空间瓶颈。

2. NetworkManager 状态

CentOS 6 检查与禁用命令:

chkconfig --list NetworkManager
service NetworkManager stop
chkconfig NetworkManager off

CentOS 7 检查与禁用命令:

systemctl status NetworkManager.service
systemctl stop NetworkManager.service
systemctl disable NetworkManager.service

预期输出示例:

CentOS 6:

NetworkManager 0:关闭 1:关闭 2:关闭 3:关闭 4:关闭 5:关闭 6:关闭

CentOS 7:

Active: inactive (dead)

3. 防火墙状态

CentOS 6 命令:

chkconfig --list iptables
chkconfig --list ip6tables
service iptables stop
chkconfig iptables off
chkconfig ip6tables off

CentOS 7 命令:

systemctl status firewalld.service
systemctl stop firewalld.service
systemctl disable firewalld.service

预期输出示例:

firewalld.service - dynamic firewall daemon
Active: inactive (dead)

4. Selinux 配置

检查与禁用命令:

more /etc/selinux/config
getenforce
sed -i "s/SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config
setenforce 0

预期输出:

配置文件中的 SELINUX=disabled,当前状态为 PermissiveDisabled

5. 系统资源限制

配置文件路径:

/etc/security/limits.conf

推荐配置内容:

* soft nofile 65536
* hard nofile 65536
* soft nproc 16384
* hard nproc 16384

6. PAM 模块配置

修改文件:

/etc/pam.d/login

添加内容:

session required pam_limits.so

7. 系统与数据库时区一致性

命令:

date -R
mysql> show global variables like 'system_time_zone';

预期输出:

操作系统与 MySQL 的时区设置保持一致,例如均为 CST+08:00

设置方法:

set time_zone = '+08:00';

8. 安装数据库依赖包

命令:

yum -y install gcc* gcc-c++ libaio-devel* libgcrypt

预期输出:

安装无报错,依赖包完整。

9. NUMA 禁用

检查命令:

grep -i numa /var/log/dmesg

预期输出示例:

NUMA turned off
numa=off

禁用命令:

grubby --args="numa=off" --update-kernel $(grubby --default-kernel)
reboot

二、数据库层基线核查(MySQL)

1. 定时备份任务配置

检查命令(Linux):

crontab -l

预期输出:

存在定时调用 mysqldump 等逻辑备份脚本的计划任务。

2. 会话连接参数

检查命令:

show global variables where variable_name in ('max_connections','max_user_connections','wait_timeout','interactive_timeout','connect_timeout');
show global status where variable_name in ('Max_used_connections');

预期输出示例:

max_connections = 5000
Max_used_connections = 600

推荐设置命令:

set global max_connections=5000;
set global max_user_connections=4000;
set global max_connect_errors=50000;
set global wait_timeout=7200;
set global interactive_timeout=7200;
set global connect_timeout=10;

3. Binlog 与 GTID 配置

检查命令:

show global variables where variable_name in ('log_bin','binlog_format','gtid_mode','enforce_gtid_consistency','expire_logs_days');

预期输出:

log_bin = ON
binlog_format = ROW
gtid_mode = ON
enforce_gtid_consistency = ON

设置命令(需已开启 binlog):

set global binlog_format='ROW';
set global gtid_mode=ON;
set global enforce_gtid_consistency=ON;
set global expire_logs_days=7;

4. 强一致性模式(双一模式)

检查命令:

show global variables where variable_name in ('sync_binlog','innodb_flush_log_at_trx_commit');

预期输出:

sync_binlog = 1
innodb_flush_log_at_trx_commit = 1

设置命令:

set global sync_binlog=1;
set global innodb_flush_log_at_trx_commit=1;

5. Redo 日志文件参数

检查命令:

show global variables where variable_name in ('innodb_log_file_size','innodb_log_files_in_group');

推荐配置(需重启生效):

innodb_log_file_size = 1048576000
innodb_log_files_in_group = 3

6. 缓存参数优化

命令:

show global variables where variable_name in ('sort_buffer_size','join_buffer_size','max_allowed_packet');

推荐设置:

set global sort_buffer_size=720896;
set global join_buffer_size=360448;
set global max_allowed_packet=1073741824;

7. 临时表缓存参数

命令:

show global variables where variable_name in ('max_heap_table_size','tmp_table_size');

推荐设置:

set global max_heap_table_size=16777216;
set global tmp_table_size=16777216;

8. InnoDB 缓冲池大小

命令:

show global variables where variable_name='innodb_buffer_pool_size';
free -h

推荐配置:

缓冲池大小为物理内存的 50% 至 80%,例如:

set global innodb_buffer_pool_size=134217728;

9. 事务隔离级别

检查命令:

show global variables where variable_name='transaction-isolation';

推荐配置:

set global transaction-isolation='READ-COMMITTED';

10. 字符集设置

检查命令:

show global variables where variable_name='character_set_server';

推荐配置:

set global character_set_server='utf8mb4';

11. 表名大小写敏感控制(需重启)

检查命令:

show global variables where variable_name='lower_case_table_names';

推荐配置:

在配置文件 my.cnf 中设置:

lower_case_table_names=1

12. 用户安全性核查

命令:

select user,host from mysql.user where authentication_string=password(user);

预期输出:

无用户名密码一致的账户。若存在,需及时修改用户密码。

总结

本基线核查清单涵盖 MySQL 在交付部署过程中需要重点关注的系统与数据库参数配置,确保环境符合最佳实践与安全要求。建议将核查内容固化为标准化流程,纳入 CMDB 自动化扫描或数据库上线前检查清单中。

IMG_6768 2.jpg
hhh6.jpg

http://www.dtcms.com/wzjs/311776.html

相关文章:

  • 江苏做网站找谁seo公司重庆
  • 个人网站设计总结seo谷歌
  • 做企业网站的轻量级cms网络营销专业介绍
  • 和小学生做的黄色网站百度推广官网首页
  • java在线学习网站开发seo是什么部门
  • 网站长尾关键词优化如何做网页推广
  • 网站建设模版怎么申请网站空间
  • 两个域名指向同一个网站怎么做网络整合营销案例
  • 免费做英文网站自建网站平台
  • 学网站建设需要多长时间nba排名最新
  • 义乌百度推广公司全网关键词优化公司哪家好
  • wordpress改头像优化内容
  • 做网站开发多少钱app引导页模板html
  • 新电商网站百度一下你就知道主页
  • 计算机前景和就业seo运营推广
  • 公司建网站多少百度推广方案怎么写
  • 网站开发属于什么资产如何拿高权重网站外链进行互换?
  • 世界网站流量排名统计网站流量的网站
  • 北京地区做网站推广用哪家的好seo优化报价
  • 做网站与做app哪个容易广州百度网站推广
  • 网站如何做邮箱订阅号新东方考研班收费价格表
  • 黑客怎么入侵网站做网站优化推广
  • 阿里云 wordpress 建站网络营销的概念与含义
  • 十四冶建设集团技工学校网站指数运算法则
  • 京美建站近期的新闻消息
  • 做视频网站带宽寻找外贸客户的网站
  • lol做视频那个网站好乌海网站seo
  • 上海建设工程检测登记的网站今日新闻简报
  • 在网站上做的h5如何发到微信上百度网站安全检测
  • flarum wordpress太原seo网络优化招聘网