<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Posts on 蓝胖的个人博客</title>
    <link>https://blog.lanpang.top/posts/</link>
    <description>Recent content in Posts on 蓝胖的个人博客</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-cn</language>
    <lastBuildDate>Thu, 20 Feb 2025 14:38:40 +0800</lastBuildDate><atom:link href="https://blog.lanpang.top/posts/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>搭建 Patroni PostgreSQL 高可用集群 </title>
      <link>https://blog.lanpang.top/posts/patroni-for-ha-pg/</link>
      <pubDate>Thu, 20 Feb 2025 14:38:40 +0800</pubDate>
      
      <guid>https://blog.lanpang.top/posts/patroni-for-ha-pg/</guid>
      
      <description>项目地址：https://github.com/patroni/patroni
官方文档：https://patroni.readthedocs.io/en/latest/
中文手册：https://postgres-cn.github.io/patroni-doccn/
参考：Percona Documentation
服务规划 hostname ip 服务 node1 172.17.83.2 etcd,postgresql,Patroni,haproxy node2 172.17.83.8 etcd,postgresql,Patroni,haproxy node3 172.17.83.12 etcd,postgresql,Patroni,haproxy 准备工作 调整 hostname
# 修改 hostname hostnamectl set-hostname node1 # 修改 hosts文件 /etc/hosts 172.17.83.2 node1 172.17.83.8 node2 172.17.83.12 node3 Watchdog
# 加载 `softdog` 内核模块 modprobe softdog chown postgres /dev/watchdog # 确保 Watchdog 设备文件存在 [root@node2 pgsql]# ll /dev/watchdog crw------- 1 postgres root 10, 130 2月 12 09:54 /dev/watchdog 部署 PG14 安装PG # 更新系统包 yum install -y epel-release yum update -y # 安装pg yum install -y https://download.</description>
      
    </item>
    
    <item>
      <title>安装 Golang 环境</title>
      <link>https://blog.lanpang.top/posts/configure-golang-environment/</link>
      <pubDate>Mon, 29 Jul 2024 10:19:57 +0800</pubDate>
      
      <guid>https://blog.lanpang.top/posts/configure-golang-environment/</guid>
      
      <description>mac brew install go linux 下载：https://go.dev/dl/
下载安装对应版本的安装包：go1.18.2.darwin-amd64.pkg，默认安装路径：/usr/local/go
设置全局变量
# golang export GOROOT=&amp;#34;/usr/local/go&amp;#34; export PATH=&amp;#34;$GOROOT/bin:$PATH&amp;#34; export GOPATH=&amp;#34;$HOME/go&amp;#34; export PATH=&amp;#34;$GOPATH/bin:$PATH&amp;#34; 使生效：`source /etc/profile
优化配置 # 开启 go module ，默认在项目根目录下生成两个文件`go.mod`和`go.sum` go env -w GO111MODULE=on # Go1.13之后GOPROXY默认值为https://proxy.golang.org，在国内是无法访问的，因此一般会改成goproxy.cn go env -w GOPROXY=https://goproxy.cn,direct go env -w GOPROXY=https://mirrors.aliyun.com/goproxy/,direct go env -w GOPROXY=https://mirrors.cloud.tencent.com/go/,direct </description>
      
    </item>
    
  </channel>
</rss>
