摘要: 1、需要提升为主的从库,停止io线程等待slave数据全部更新完毕 stop slave IO_THREAD #show processlist的输出,直到看到状态是Slave has read all relay log; waiting for the slave I/O thread to u 阅读全文
posted @ 2016-11-06 21:14 xuanhui 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 一、日志切割 原理: 1、cp一个慢日志备份 2、清空原理的慢日志 3、写成脚本,每天一切,这样就ok啦 二、查找日志中的慢日志 1、做了日志切割(慢日志文件就小了) 2、查找某个时间的慢日志 日志时间格式: # Time: 161102 3:50:14 用grep过滤: grep -A15 "Ti 阅读全文
posted @ 2016-11-06 21:09 xuanhui 阅读(196) 评论(0) 推荐(0) 编辑
摘要: @echo off set /p host=host Address: set logfile=Log_%host%.log echo Target Host = %host% >%logfile%for /f "tokens=*" %%A in ('ping %host% -n 1 ') do ( 阅读全文
posted @ 2016-11-06 21:03 xuanhui 阅读(982) 评论(0) 推荐(0) 编辑
摘要: 一、安装nfs: yum install nfs-utils rpcbind 创建共享目录:mkdir -p /XXX/export/ 修改配置文件:vim /etc/exports /XXX/export 10.10.10.65(rw,sync,no_root_squash) #ip与括号之间不能 阅读全文
posted @ 2016-11-06 20:56 xuanhui 阅读(162) 评论(0) 推荐(0) 编辑
摘要: 命令行: for i in `chkconfig --list |grep 3:on|awk '{print $1}' |grep -Ev "network|sshd|sysstat|udev*|crond"`;do chkconfig $i off;done 阅读全文
posted @ 2016-11-06 20:33 xuanhui 阅读(534) 评论(0) 推荐(0) 编辑
摘要: 一、基于秘钥认证: ssh-keygen ssh-copy-id -i .ssh/id_rsa.pub 10.10.10.70#在对方authorized_keys 文件中写入自己的id_rsa.pub文件中的内容 #cat id_rsa.pub > authorized_keys #本机对本机 二 阅读全文
posted @ 2016-11-06 20:31 xuanhui 阅读(147) 评论(0) 推荐(0) 编辑
摘要: 企业中使用iptables防火墙:(一般不要在命令中输入规则) # Firewall configuration written by system-config-firewall# Manual customization of this file is not recommended.*filt 阅读全文
posted @ 2016-11-06 20:26 xuanhui 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 知识点: server的语法: upstream语法: upstream中192.168.100.1不是ip只是个标识,只要和下面的proxy_pass 对应即可。 基于IP的虚拟主机: listen和server_name中多加上端口也没问题 listen可以监听在虚拟ip上面 代码: upstr 阅读全文
posted @ 2016-11-06 20:15 xuanhui 阅读(279) 评论(0) 推荐(0) 编辑