摘要: 修改last日志,需修改/var/log/wtmp文件,但/var/log/wtmp 文件时二进制,通过下面命令将二进制文件转换为可编辑文件 wtmp.file utmpdump /var/log/wtmp >/var/log/wtmp.file 编辑/var/log/wtmp.file 删除部分l 阅读全文
posted @ 2020-06-05 13:05 alexhe 阅读(1712) 评论(0) 推荐(0)
摘要: curl 'http://store.onlyharbor.com/api/repositories/boss/crm/tags?detail=1' \ -H 'Connection: keep-alive' \ -H 'Pragma: no-cache' \ -H 'Cache-Control: 阅读全文
posted @ 2020-05-12 10:51 alexhe 阅读(139) 评论(0) 推荐(0)
摘要: vim /etc/netplan/50-cloud-init.yaml 写入网卡 root@master:~# cat /etc/netplan/50-cloud-init.yaml # This file is generated from information provided by # th 阅读全文
posted @ 2020-05-11 15:36 alexhe 阅读(218) 评论(0) 推荐(0)
摘要: 主: cat /etc/keepalived/keepalived.conf ! Configuration File for keepalived global_defs { router_id LVS_DEVEL} vrrp_instance VI_1 { state MASTER interf 阅读全文
posted @ 2020-05-07 11:52 alexhe 阅读(185) 评论(0) 推荐(0)
摘要: apt-get install -y zabbix-agentsed -i -e 's/Server=127.0.0.1/Server=10.11.10.230,10.11.30.120/g' -e 's/ServerActive=127.0.0.1/ServerActive=10.11.10.23 阅读全文
posted @ 2020-05-06 17:09 alexhe 阅读(92) 评论(0) 推荐(0)
摘要: pg主机: 开用户 createuser -s -P barman 密码barman1234 创建replication用户 createuser -P --replication streaming_barman 密码streaming_barman1234 ssh-keygen barman主机 阅读全文
posted @ 2020-04-27 15:47 alexhe 阅读(182) 评论(0) 推荐(0)
摘要: 主apt-get install postgresql-11sudo -u postgres psqlalter user postgres with password 'alex1234';vim /etc/postgresql/11/main/pg_hba.confhost all all 0. 阅读全文
posted @ 2020-04-20 15:35 alexhe 阅读(615) 评论(0) 推荐(0)
摘要: 主库sudo -u postgres psqlcreate user replica with replication password '123456'; vim /etc/postgresql/11/main/postgresql.conflisten_addresses = '*' # 监听所 阅读全文
posted @ 2020-03-27 09:49 alexhe 阅读(569) 评论(0) 推荐(0)
摘要: 25.3. 连续归档和时间点恢复(PITR) 摘自http://www.postgres.cn/docs/11/continuous-archiving.html 第一步建立wal归档 wal_level配置成replica或更高 archive_mode为on 配置archive_command, 阅读全文
posted @ 2020-03-23 11:20 alexhe 阅读(510) 评论(0) 推荐(0)
摘要: server: yum -y install nfs-utils cat /etc/exports/nfs 10.11.0.0/16(rw,sync,no_root_squash,no_subtree_check) systemctl enable rpcbind systemctl restart 阅读全文
posted @ 2019-12-27 10:11 alexhe 阅读(962) 评论(0) 推荐(0)