摘要: #文件目录结构 [root@centos8 ansible ]#tree . ├── role_nginx.yml └── roles └── nginx ├── files │ ├── nginx.conf │ └── nginx.service ├── tasks │ ├── configure 阅读全文
posted @ 2022-04-13 10:48 辛杨 阅读(63) 评论(0) 推荐(0)
摘要: #实验环境,关闭selinux和防火墙时间同步; mycat-server 192.168.6.137#内存建议2G以上 mysql-master 192.168.6.132 MySQL 8.0 或者Mariadb 10.3.17 mysql-slave 192.168.6.130 MySQL 8. 阅读全文
posted @ 2022-03-11 17:24 辛杨 阅读(108) 评论(0) 推荐(0)
摘要: #主机192.168.6.132,从:192.168.6.130 mysql-server 8.0.26 #主数据库配置 #修改server-id号 [root@xinye ~]#vim /etc/my.cnf [mysqld] server-id=32 #建议设置成当前设备IP尾号避免冲突 #查看 阅读全文
posted @ 2022-03-09 12:15 辛杨 阅读(88) 评论(0) 推荐(0)
摘要: 案例说明:每天2:30做完全备份,早上10:00误删除了表students,10:10才发现故障,现需要将数据库还原到10:10的状态,且恢复被删除的teachers表 #完全备分数据库 [root@xinye ~]#mysqldump -A -F --single-transaction --ma 阅读全文
posted @ 2022-03-08 11:44 辛杨 阅读(150) 评论(0) 推荐(0)
摘要: 常用命令 mysql -u 用户名 -p 登录数据库 quit; exit; 退出数据库 create database 数据库名 创建数据库 drop datebase 数据库名 删除数据库 show databases; 显示数据库 use 数据库名称 打开数据库 create table 表名 阅读全文
posted @ 2022-03-06 15:08 辛杨 阅读(49) 评论(0) 推荐(0)
摘要: 导入hellodb.sql生成数据库 mysql < hellodb.sql 在students表中,查询年龄大于25岁,且为男性的同学的名字和年龄 root@localhost [hellodb]>select name as 姓名 , age 年龄 from students where age 阅读全文
posted @ 2022-03-04 09:50 辛杨 阅读(54) 评论(0) 推荐(0)
摘要: 1、限制本地主机的web服务器在周一不允许访问;新请求的速率不能超过100个每秒;web服务器包含了admin字符串的页面不允许访问;web服务器仅允许响应报文离开本机 问题分解:①限制外部访问本地主机: 使用INPUT链②限制访问web服务: 使用基本规则匹配器,协议匹配 -p tcp 端口匹配 阅读全文
posted @ 2022-02-23 16:44 辛杨 阅读(283) 评论(0) 推荐(0)