• 博客园logo
  • 会员
  • 周边
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
 






会飞の鱼

 
 

Powered by 博客园
博客园 | 首页 | 新随笔 | 联系 | 订阅 订阅 | 管理

11 2017 档案

 
xbstream 备份恢复
摘要:xbstream -x < ./backs/backup.xbstream -C /dbnode/data/ innobackupex --defaults-file=/dbnode/etc/my.cnf --ibbackup=xtrabackup --apply-log /dbnode/data/ 阅读全文
posted @ 2017-11-30 17:28 会飞の鱼 阅读(4570) 评论(0) 推荐(0)
mysqldump test
摘要:CREATE TABLE IF NOT EXISTS `runoob_tbl`( `runoob_id` INT UNSIGNED AUTO_INCREMENT, `runoob_title` VARCHAR(100) NOT NULL, `runoob_author` VARCHAR(40) NO 阅读全文
posted @ 2017-11-27 11:54 会飞の鱼 阅读(301) 评论(0) 推荐(0)
beego 自定义模板函数
摘要:beego支持的模板函数不是很多,有时候前端展现数据的时候,要对数据进行格式化,所以要用到自定义模板函数 比如我的前端模板上有时间和模板大小这2个数据,原始数据都是int的时间戳和byte单位的数据,我们要更友好的展示这些数据,就要对这些数据进行格式化 效果是这样的,可以看到时间和大小这2列已经是友 阅读全文
posted @ 2017-11-25 09:31 会飞の鱼 阅读(680) 评论(0) 推荐(0)
beego 中文教程
摘要:https://www.kancloud.cn/hello123/beego/126087 阅读全文
posted @ 2017-11-24 14:51 会飞の鱼 阅读(1561) 评论(0) 推荐(1)
git 转移
摘要:git push --mirror https://github.com/cloud-pi/drbd-docker-plugin.git 阅读全文
posted @ 2017-11-22 15:24 会飞の鱼 阅读(145) 评论(0) 推荐(0)
go unit test-monkey
摘要:package main import ( "fmt" "github.com/bouk/monkey" "os" "os/exec" "reflect" "testing" ) // 假如我们要测试函数 call func call(cmd string) (int, string) { byte 阅读全文
posted @ 2017-11-19 19:15 会飞の鱼 阅读(1315) 评论(0) 推荐(0)
用Pylint规范化Python代码,附PyCharm配置
摘要:Pylint一个可以检查Python代码错误,执行代码规范的工具。它还可以对代码风格提出建议。 官网:https://pylint.readthedocs.io pip install pylint 默认情况,Pylint就已经随着Python安装好。在Python的scripts目录下。 找一段小 阅读全文
posted @ 2017-11-18 18:47 会飞の鱼 阅读(1117) 评论(0) 推荐(1)
minio test
摘要:docker pull minio/minio docker run --name=minio -d -p 9001:9000 minio/minio server /datahttps://docs.minio.io/docswget https://dl.minio.io/client/mc/r 阅读全文
posted @ 2017-11-17 14:58 会飞の鱼 阅读(443) 评论(0) 推荐(0)
centos7 vnc server
摘要:yum -y install vnc *vnc-server* vncserver vncserver :2 vncserver -geometry 1900x1024 安装 X-Window #yum install gnome-classic-session gnome-terminal nau 阅读全文
posted @ 2017-11-16 22:24 会飞の鱼 阅读(172) 评论(0) 推荐(0)
MySQL5.7(5.6)GTID环境下恢复从库思(qi)路(yin)方(ji)法(qiao)
摘要:要讨论如何恢复从库,我们得先来了解如下一些概念: GTID_EXECUTED:它是一组包含已经记录在二进制日志文件中的事务集合 GTID_PURGED:它是一组包含已经从二进制日志删除掉的事务集合。 在继续讨论时,我们先来看下如何新建一个基于GTID的slave。 通过了解上面的两个参数,我们现在只 阅读全文
posted @ 2017-11-16 19:16 会飞の鱼 阅读(305) 评论(0) 推荐(0)
mysql error
摘要:2017-11-16T07:07:51.664585132Z 2017-11-16T07:07:51.664443Z 0 [ERROR] InnoDB: Your database may be corrupt or you may have copied the InnoDB tablespace 阅读全文
posted @ 2017-11-16 19:14 会飞の鱼 阅读(757) 评论(0) 推荐(0)
python grpc
摘要:pip install grpcio pip install grpcio-tools python -m grpc_tools.protoc -I. --python_out=. --grpc_python_out=. ./data.proto 阅读全文
posted @ 2017-11-16 10:03 会飞の鱼 阅读(213) 评论(0) 推荐(0)
sha1sum校验下载的文件
摘要:[root@mhc1 test]# sha1sum Percona-XtraBackup-2.4.8-r97330f7-jessie-x86_64-bundle.tara9c6b1c7cb3bf98b3b7d7d3a986587be9ea2f1ec Percona-XtraBackup-2.4.8- 阅读全文
posted @ 2017-11-12 20:02 会飞の鱼 阅读(2247) 评论(0) 推荐(0)
vmvare centos7 切换桌面和命令行模式
摘要:systemctl set-default multi-user.target 命令行 systemctl set-default graphical.target 桌面 阅读全文
posted @ 2017-11-10 23:39 会飞の鱼 阅读(634) 评论(0) 推荐(0)
drbd switch off
摘要:DRBD secondary to primary: drbdadm disconnect all drbdadm primary r0 --force mount /dev/drbd0 /mnt [drbdadm connect r0] to wait old primary restore Ol 阅读全文
posted @ 2017-11-10 11:18 会飞の鱼 阅读(151) 评论(0) 推荐(0)
CentOS下VMware用桥接模式,静态ip上外网
摘要:桥接网卡选择 在window上用 ipconfig /all CentOS下VMware用桥接模式,静态ip上外网 15年的时候,写过一篇博客:VMware中网络设置之Bridged 也是关于linux下vmware桥接模式、静态ip上外网的配置,不过当时更多的是用图形界面来实现的,通用性不强。生产 阅读全文
posted @ 2017-11-10 00:09 会飞の鱼 阅读(592) 评论(0) 推荐(0)
mesos in docker
摘要:docker pull mesosphere/mesos-master:1.4.0 docker pull mesosphere/mesos-slave:1.4.0 在Docker中运行Mesos的推荐方式是在自己的机器上运行每个主站和从站容器,并使用自己的IP。 主机网络(--net =host) 阅读全文
posted @ 2017-11-08 23:18 会飞の鱼 阅读(328) 评论(0) 推荐(0)
go cobra
摘要:https://github.com/spf13/cobra https://github.com/spf13/cobra/blob/master/bash_completions.md cobra init cobratest main.go 目录下 Persistent Flags 一个标志可以 阅读全文
posted @ 2017-11-07 19:02 会飞の鱼 阅读(319) 评论(0) 推荐(0)
drbd mysql
摘要:使用drbd前 升级内核 yum install kernel* 重启 4.1、准备: 两个节点ha-node1和ha-node2均按照centos7.0系统,每个节点两块磁盘,一块用作根分区一块用作drbd 修改主机名: 节点1 节点2 4.2、磁盘分区如下 4.3、创建lvm(每个节点都需执行) 阅读全文
posted @ 2017-11-05 22:31 会飞の鱼 阅读(692) 评论(0) 推荐(0)
go 根据字符串生成随机值
摘要:md5.Sum([]byte(v.Sshcmd))) 阅读全文
posted @ 2017-11-04 13:32 会飞の鱼 阅读(841) 评论(0) 推荐(0)
docker plugin test
摘要:docker build -t docker-volume-drbd . id=$(docker create docker-volume-drbd true) docker export $id -o img.tar 解压到rootfs scp.sh `pwd`/drbd_plugin /home 阅读全文
posted @ 2017-11-03 18:15 会飞の鱼 阅读(283) 评论(0) 推荐(0)
docker ui
摘要:If you're running Docker over tcp: 阅读全文
posted @ 2017-11-01 14:37 会飞の鱼 阅读(219) 评论(0) 推荐(0)