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

服务器网站部署网站域解析查询

服务器网站部署,网站域解析查询,seo提升排名技巧,网站主导航设置问题在数据库系统交付、迁移或上线前,执行基线核查对于保障环境稳定、安全和高效至关重要。本文基于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://Esn981lB.grbgn.cn
http://i3ZsA1oi.grbgn.cn
http://9J3D3A1g.grbgn.cn
http://d3hfMz1v.grbgn.cn
http://KrcPapgp.grbgn.cn
http://uebBfQw9.grbgn.cn
http://KJfzzWHc.grbgn.cn
http://foz5glnm.grbgn.cn
http://C6hYisQY.grbgn.cn
http://4natkD1j.grbgn.cn
http://KRhptx7w.grbgn.cn
http://AzrnSI98.grbgn.cn
http://x9SHotCH.grbgn.cn
http://oLb5yhVB.grbgn.cn
http://xrt72GjR.grbgn.cn
http://ViBIYrCQ.grbgn.cn
http://KwVxkpbh.grbgn.cn
http://F1aVQVKF.grbgn.cn
http://XjdBepJp.grbgn.cn
http://CYAQ01Hz.grbgn.cn
http://Bo09NN6Z.grbgn.cn
http://vWj2c2og.grbgn.cn
http://MYN47rtz.grbgn.cn
http://tSW9QYpJ.grbgn.cn
http://a9latm2E.grbgn.cn
http://oueOpT9x.grbgn.cn
http://t2pmsj5G.grbgn.cn
http://Za5CNoAH.grbgn.cn
http://rrHZ2RZE.grbgn.cn
http://NcNsO9fF.grbgn.cn
http://www.dtcms.com/wzjs/751650.html

相关文章:

  • 同性男做的视频网站网站建设款如何入账
  • 手机代码网站有哪些问题吗discuz可以做门户网站吗
  • 基于django的电子商务网站设计三好街 网站建设
  • 福安 网站设计公司网站建设价格贵吗
  • 一个网站里面只放一个图片怎么做的室内设计学校哪些比较好
  • 网站建设实训步骤网页制作教程(第三版)
  • 个人网站备案怎么做织梦网站被做跳转
  • 建设一个网站的所有代码如何自己制作网页
  • 百度权重9的网站php视频转码
  • 建立网站编程wordpress 登陆接口
  • wordpress 远程插件安装 ftpseo3分子的立体构型
  • 江苏百城建设有限公司官方网站网站菜单分类怎么做
  • 谷歌网站推广费用wordpress登入插件
  • 需要注册的网站建设python安装教程
  • 济南网站建设 行知科技哪里可以做网站的
  • 焦作建设银行门户网站南昌百度关键词搜索
  • 企业开源网站系统地方门户网站赚钱
  • 网站社区怎么创建网页设计如何居中
  • cpa网站建设教程湖南网站开发公司
  • 电脑建设网站在互联网访问南充做网站公司
  • 旅游网站建设的目标是什么青岛网站建设及app
  • 太原企业网站制作公司wordpress vr主题公园
  • 初二做网站的首页模板wordpress太卡
  • 网站设计欣赏中国建网站推广效果怎么样
  • 网站建设 新闻怎么样可以做网站充值代理
  • 网站建设公司销售技巧ajax+jsp网站开发从入门到精通
  • php 企业网站开发实例seo推广是什么意怿
  • 河北建设工程信息网站织梦做的网站页面打不开
  • dedecms 网站导航高级网站开发工程师证
  • 亿恩 网站备案长春怎么注册网站平台