Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • D dev-docs
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Jira
    • Jira
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • WiseCRM
  • dev-docs
  • Wiki
  • 服务器运维

服务器运维 · Changes

Page history
更新 服务器运维 authored Jan 20, 2022 by 赵方方's avatar 赵方方
Hide whitespace changes
Inline Side-by-side
服务器运维.md
View page @ 57d63c4b
[[_TOC_]]
运维范围包括自用 SaaS 服务器,及客户托管在我司的服务器。
运维范围包括自用 SaaS 服务器,及客户托管在我司的服务器。服务器列表即登录方式联系 [赵方方](mailto:zhaoff@wisecrm.com) 索取。
## 服务器分布
......@@ -19,22 +19,132 @@
### 人员
- 检查人:赵方方
- 核查人:杨志永
- 检查人:[赵方方](mailto:zhaoff@wisecrm.com)
- 核查人:[杨志永](mailto:yangzy@wisecrm.com)
### 周期
- 检查:每周一(节假日顺延)
- 核查:检查后的 `2天` 内
- 核查:检查后的 2 天内
## 检查项
- (1) 磁盘占用率。预警阈值 `80-90%`。sh `df -lh`
- (2) HTTPS 有效期。预阈值 `14-28天`。点击查看 [365.wisecrm.cn](https://myssl.com/365.wisecrm.cn?domain=365.wisecrm.cn&status=q&f=1) [365.wisecrm.com](https://myssl.com/365.wisecrm.com?domain=365.wisecrm.com&status=q&f=1)
- (2) HTTPS 有效期。预阈值 `14-28天`
- (3) 备份是否正常。检查 NAS 服务器是否有文件及文件大小是否异常
- (4) 主/从库是否正常。SQL `show master status` `show slave status`
- (5) OS 补丁。sh `yum update`
### (1) 磁盘占用率
腾讯云/阿里云已配置告警,达到占用阈值将自动发送邮件告警。也可以在服务器上直接查看,命令如下。
```
# df -lh
文件系统 容量 已用 可用 已用% 挂载点
devtmpfs 7.6G 0 7.6G 0% /dev
tmpfs 7.6G 0 7.6G 0% /dev/shm
tmpfs 7.6G 530M 7.1G 7% /run
tmpfs 7.6G 0 7.6G 0% /sys/fs/cgroup
/dev/mapper/centos-root 100G 2.5G 98G 3% /
/dev/sda2 3.0G 181M 2.9G 6% /boot
/dev/mapper/centos-home 102T 9.8G 102T 1% /home
tmpfs 1.6G 0 1.6G 0% /run/user/0
```
通过 `已用%` 列查看磁盘占用百分比。
### (2) HTTPS 有效期
可以通过点击浏览器地址中的小锁查看证书信息,或点击如下域名列表直接查看:
- [365.wisecrm.cn](https://myssl.com/365.wisecrm.cn?domain=365.wisecrm.cn&status=q&f=1) 阿里云用,通配符域名
- [365.wisecrm.com](https://myssl.com/365.wisecrm.com?domain=365.wisecrm.com&status=q&f=1) 腾讯云用,通配符域名
- [www.wisecrm.com](https://myssl.com/www.wisecrm.com?domain=www.wisecrm.com&status=q&f=1)
### (3) 备份是否正常
进入 NAS 备份机器 `222.73.105.194`,进入备份目录 `/home/nasuser/nas/backups/`,然后查看子目录下的各文件夹内是否有最新的备份文件(日期命名),以及备份文件大小,若备份未见太小(小于10K)也可能是备份故障。
### (4) 主/从库是否正常
对于已配置主/从库的 MySQL,通过在从库执行命令 `show slave status` 查看从库同步状态。
若结果显示 `Slave_IO_Running` `Slave_SQL_Running` 列均为 `Yes` 表示正常。同时还需查看 `Seconds_Behind_Master` 是否大于 `0`,若大于 0 表示同步存在延迟,应尽快查明原因并修复。
```
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 172.16.39.43
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: mysql-bin.000108
Read_Master_Log_Pos: 233361306
Relay_Log_File: mysql-relay-bin.000321
Relay_Log_Pos: 233361479
Relay_Master_Log_File: mysql-bin.000108
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB: wisecloudcrm_8316
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 233361306
Relay_Log_Space: 233361773
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 0
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 3652
Master_UUID: 7c5eedf6-665a-11e9-be49-00163e0d212b
Master_Info_File: /data/mysql/master.info
SQL_Delay: 0
SQL_Remaining_Delay: NULL
Slave_SQL_Running_State: Slave has read all relay log; waiting for more updates
Master_Retry_Count: 86400
Master_Bind:
Last_IO_Error_Timestamp:
Last_SQL_Error_Timestamp:
Master_SSL_Crl:
Master_SSL_Crlpath:
Retrieved_Gtid_Set: 7c5eedf6-665a-11e9-be49-00163e0d212b:1-35146123
Executed_Gtid_Set: 3d981aca-4842-11ec-b8b4-00163e14bd0f:1-10,
7c5eedf6-665a-11e9-be49-00163e0d212b:1-35146123
Auto_Position: 1
Replicate_Rewrite_DB:
Channel_Name:
Master_TLS_Version:
1 row in set (0.00 sec)
ERROR:
No query specified
```
### (5) OS 补丁
通过执行 `yum update` 可以直接更新补丁。如有需要更新的补丁会自动列出,按 `y` 回车即可更新。如没有需要更新的补丁则无需进一步处理。
注意:补丁更新尽量安排在夜间进行,内核级的补丁可能需要重启服务器才可生效。
## 预警处置
- 检查项 (1) `1-3天` 处置
......
Clone repository
  • Home
  • 服务器运维

© 上海企全信息技术有限公司