<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>运维实践 on 我的个人博客</title>
        <link>https://liangjinzhi.com/categories/%E8%BF%90%E7%BB%B4%E5%AE%9E%E8%B7%B5/</link>
        <description>Recent content in 运维实践 on 我的个人博客</description>
        <generator>Hugo -- gohugo.io</generator>
        <language>zh-cn</language>
        <lastBuildDate>Sat, 27 Jun 2026 03:38:22 +0000</lastBuildDate><atom:link href="https://liangjinzhi.com/categories/%E8%BF%90%E7%BB%B4%E5%AE%9E%E8%B7%B5/index.xml" rel="self" type="application/rss+xml" /><item>
            <title>Loki日志管理</title>
            <link>https://liangjinzhi.com/building-grafana-loki-log-analysis/</link>
            <pubDate>Sat, 27 Jun 2026 03:38:22 +0000</pubDate>
            <guid>https://liangjinzhi.com/building-grafana-loki-log-analysis/</guid>
            <description>&lt;p&gt;5分钟告别传统 SSH 黑框，教你搭建极轻量、纯网页端的自动化日志监控平台。&lt;/p&gt;&#xA;&lt;p&gt;为了确保最高的稳定性和极低的资源消耗，遵循 Grafana 官方推荐的&lt;strong&gt;单机二进制（Binary）部署指导&lt;/strong&gt;（比 Docker 性能更好、更直观）。&lt;/p&gt;&#xA;&lt;p&gt;目标：在已有granfana平台的基础 上部署Loki,并监控服务器的相关日志&lt;/p&gt;&#xA;&lt;p&gt;前提：开放Loki端3000，3100端口&lt;/p&gt;&#xA;&lt;p&gt;准备工作：创建统一目录&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# mkdir -p /opt/loki-stack&lt;/p&gt;&#xA;&lt;h1 id=&#34;cd-optloki-stack&#34;&gt;cd /opt/loki-stack&lt;/code&gt;&lt;/pre&gt;&#xA;&lt;/h1&gt;&lt;h2 id=&#34;第一步服务端机器下载并安装-loki&#34;&gt;第一步：服务端机器下载并安装 Loki&#xA;&lt;/h2&gt;&lt;p&gt;Loki 官方提供编译好的单文件二进制包，直接下载解压即可运行。&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;1.下载官方二进制包与默认配置&lt;/strong&gt;：&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# 下载 Loki 主程序&#xA;wget &lt;a class=&#34;link&#34; href=&#34;https://github.com/grafana/loki/releases/download/v3.0.0/loki-linux-amd64.zip&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/grafana/loki/releases/download/v3.0.0/loki-linux-amd64.zip&lt;/a&gt;&#xA;#或者使用国内GitHub镜像下载Loki主程序&#xA;wget &lt;a class=&#34;link&#34; href=&#34;https://ghfast.top/https://github.com/grafana/loki/releases/download/v3.0.0/loki-linux-amd64.zip&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ghfast.top/https://github.com/grafana/loki/releases/download/v3.0.0/loki-linux-amd64.zip&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;解压&#34;&gt;解压&#xA;&lt;/h1&gt;&lt;p&gt;unzip loki-linux-amd64.zip&#xA;mv loki-linux-amd64 loki&lt;/p&gt;&#xA;&lt;h1 id=&#34;下载官方标准配置文件&#34;&gt;下载官方标准配置文件&#xA;&lt;/h1&gt;&lt;p&gt;wget &lt;a class=&#34;link&#34; href=&#34;https://raw.githubusercontent.com/grafana/loki/main/cmd/loki/loki-local-config.yaml&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://raw.githubusercontent.com/grafana/loki/main/cmd/loki/loki-local-config.yaml&lt;/a&gt; -O loki-config.yaml&#xA;#或者使用ghfast.top代理下载&#xA;#wget &lt;a class=&#34;link&#34; href=&#34;https://ghfast.top/https://raw.githubusercontent.com/grafana/loki/main/cmd/loki/loki-local-config.yaml&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ghfast.top/https://raw.githubusercontent.com/grafana/loki/main/cmd/loki/loki-local-config.yaml&lt;/a&gt; -O loki-config.yaml&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;2.清空原来的配置文件以添加“自动清理策略”&lt;/strong&gt;（防止撑爆磁盘）： 打开 &lt;code&gt;loki-config.yaml&lt;/code&gt;，在文件末尾添加以下内容：&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;auth_enabled: false&lt;/p&gt;&#xA;&lt;p&gt;server:&#xA;http_listen_port: 3100&#xA;grpc_listen_port: 9096&lt;/p&gt;&#xA;&lt;p&gt;common:&#xA;instance_addr: 127.0.0.1&#xA;path_prefix: /tmp/loki&#xA;storage:&#xA;filesystem:&#xA;chunks_directory: /tmp/loki/chunks&#xA;rules_directory: /tmp/loki/rules&#xA;replication_factor: 1&#xA;ring:&#xA;kvstore:&#xA;store: inmemory&lt;/p&gt;&#xA;&lt;p&gt;schema_config:&#xA;configs:&#xA;- from: 2024-01-01&#xA;store: tsdb&#xA;object_store: filesystem&#xA;schema: v13&#xA;index:&#xA;prefix: index_&#xA;period: 24h&lt;/p&gt;&#xA;&lt;p&gt;limits_config:&#xA;retention_period: 168h #地保留7天日志，绝不重复&lt;/p&gt;&#xA;&lt;p&gt;compactor:&#xA;working_directory: /tmp/loki/retention&#xA;compaction_interval: 10m&#xA;retention_enabled: true&#xA;delete_request_store: filesystem # 解决元数据存放问题&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;3.使用 Systemd 保持后台运行&lt;/strong&gt;： 创建系统服务文件 &lt;code&gt;vi /etc/systemd/system/loki.service&lt;/code&gt;：&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;[Unit]&#xA;Description=Grafana Loki Log Aggregator&#xA;After=network.target&lt;/p&gt;&#xA;&lt;p&gt;[Service]&#xA;Type=simple&#xA;ExecStart=/opt/loki-stack/loki -config.file=/opt/loki-stack/loki-config.yaml&#xA;Restart=on-failure&lt;/p&gt;&#xA;&lt;p&gt;[Install]&#xA;WantedBy=multi-user.target&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;启动 Loki&lt;/strong&gt;：&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;systemctl daemon-reload&#xA;systemctl enable loki &amp;ndash;now&lt;/p&gt;&#xA;&lt;h1 id=&#34;检查状态看到-active-running-即成功&#34;&gt;检查状态，看到 active (running) 即成功&#xA;&lt;/h1&gt;&lt;p&gt;systemctl status loki&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;第二步目标机器下载并配置-promtail-收集端&#34;&gt;第二步：目标机器下载并配置 Promtail (收集端)&#xA;&lt;/h2&gt;&lt;p&gt;Promtail 需要在日志收集端部署。&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;1.规范创建所有必要目录&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# 创建 Promtail 程序及配置目录&#xA;mkdir -p /opt/loki-stack/promtail&lt;/p&gt;&#xA;&lt;h1 id=&#34;创建你要监控的-fastapi-日志存放目录如果研发还没创建的话&#34;&gt;创建你要监控的 FastAPI 日志存放目录（如果研发还没创建的话）&#xA;&lt;/h1&gt;&lt;p&gt;mkdir -p /var/log/fastapi&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;2. 下载并解压主程序&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;进入刚刚创建好的工作目录，下载官方二进制包：&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;cd /opt/loki-stack/promtail&lt;/p&gt;&#xA;&lt;h1 id=&#34;下载官方-v300-二进制包&#34;&gt;下载官方 v3.0.0 二进制包&#xA;&lt;/h1&gt;&lt;p&gt;wget &lt;a class=&#34;link&#34; href=&#34;https://github.com/grafana/loki/releases/download/v3.0.0/promtail-linux-amd64.zip&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://github.com/grafana/loki/releases/download/v3.0.0/promtail-linux-amd64.zip&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;或者使用-ghproxy-代理加速下载&#34;&gt;或者使用 ghproxy 代理加速下载&#xA;&lt;/h1&gt;&lt;p&gt;wget &lt;a class=&#34;link&#34; href=&#34;https://ghfast.top/https://github.com/grafana/loki/releases/download/v3.0.0/promtail-linux-amd64.zip&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://ghfast.top/https://github.com/grafana/loki/releases/download/v3.0.0/promtail-linux-amd64.zip&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;解压若提示找不到命令请先执行-yum-install-unzip--y&#34;&gt;解压（若提示找不到命令，请先执行 yum install unzip -y）&#xA;&lt;/h1&gt;&lt;p&gt;unzip promtail-linux-amd64.zip&lt;/p&gt;&#xA;&lt;h1 id=&#34;将解压出来的文件重命名方便后续调用&#34;&gt;将解压出来的文件重命名，方便后续调用&#xA;&lt;/h1&gt;&lt;p&gt;mv promtail-linux-amd64 promtail&lt;/p&gt;&#xA;&lt;h1 id=&#34;清理无用的压缩包&#34;&gt;清理无用的压缩包&#xA;&lt;/h1&gt;&lt;p&gt;rm -f promtail-linux-amd64.zip&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;3. 创建配置文件&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;在当前目录下创建配置文件：&lt;code&gt;vi /opt/loki-stack/promtail/promtail-config.yaml&lt;/code&gt;，写入官方标准模板：&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;positions: {}&#xA;server:&#xA;http_listen_port: 9080&#xA;grpc_listen_port: 0&lt;/p&gt;&#xA;&lt;p&gt;positions:&#xA;filename: /opt/loki-stack/promtail/positions.yaml&lt;/p&gt;&#xA;&lt;p&gt;clients:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;url: http://10.1.0.14:3100/loki/api/v1/push&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;scrape_configs:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;job_name: fastapi-cluster&#xA;static_configs:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;targets:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;localhost&#xA;labels:&#xA;job: fastapi&#xA;host: api&#xA;&lt;strong&gt;path&lt;/strong&gt;: /home/ubuntu/api/nohup.out  #需要监控的日志文件&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;job_name: fastapi-app-logs&#xA;static_configs:&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;targets:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;localhost&#xA;labels:&#xA;job: fastapi&#xA;host: api&#xA;&lt;strong&gt;path&lt;/strong&gt;: /home/ubuntu/api/log/app.log*  #需要监控的日志文件&#xA;&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;保存退出&lt;/p&gt;&#xA;&lt;p&gt;配置Systemd服务文件&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;vi /etc/systemd/system/promtail.service&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;直接把下面的标准配置贴进去：&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;[Unit]&#xA;Description=Promtail Log Client&#xA;After=network.target&lt;/p&gt;&#xA;&lt;p&gt;[Service]&#xA;Type=simple&lt;/p&gt;&#xA;&lt;h1 id=&#34;-使用绝对路径确保后台能正确拉起程序和读到配置文件&#34;&gt;👈 使用绝对路径，确保后台能正确拉起程序和读到配置文件&#xA;&lt;/h1&gt;&lt;p&gt;ExecStart=/opt/loki-stack/promtail/promtail -config.file=/opt/loki-stack/promtail/promtail-config.yaml&#xA;Restart=on-failure&lt;/p&gt;&#xA;&lt;p&gt;[Install]&#xA;WantedBy=multi-user.target&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;ol start=&#34;2&#34;&gt;&#xA;&lt;li&gt;重新加载并一键启动&lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;保存退出后（&lt;code&gt;:wq&lt;/code&gt;），依次执行以下命令让系统识别新服务并运行：&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# 1. 刷新后台&#xA;systemctl daemon-reload&lt;/p&gt;&#xA;&lt;h1 id=&#34;2-设置开机自启并现在立刻启动它&#34;&gt;2. 设置开机自启，并现在立刻启动它&#xA;&lt;/h1&gt;&lt;p&gt;systemctl enable promtail &amp;ndash;now&lt;/p&gt;&#xA;&lt;h1 id=&#34;3-检查状态&#34;&gt;3. 检查状态&#xA;&lt;/h1&gt;&lt;p&gt;systemctl status promtail&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;直接拉起Promtail服务&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;systemctl restart promtail&#xA;systemctl status promtail&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;安装grafana&lt;/strong&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;# 1. 通过代理地址下载 Grafana 官方商业版/开源版安装包&#xA;wget &lt;a class=&#34;link&#34; href=&#34;https://mirrors.tuna.tsinghua.edu.cn/grafana/apt/pool/main/g/grafana/grafana_10.4.1_amd64.deb&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://mirrors.tuna.tsinghua.edu.cn/grafana/apt/pool/main/g/grafana/grafana_10.4.1_amd64.deb&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h1 id=&#34;2-使用-dpkg-强制安装&#34;&gt;2. 使用 dpkg 强制安装&#xA;&lt;/h1&gt;&lt;p&gt;sudo dpkg -i grafana_10.4.1_amd64.deb&lt;/p&gt;&#xA;&lt;h1 id=&#34;3-设置开机自启并现在立刻启动&#34;&gt;3. 设置开机自启并现在立刻启动&#xA;&lt;/h1&gt;&lt;p&gt;sudo systemctl daemon-reload&#xA;sudo systemctl enable grafana-server &amp;ndash;now&lt;/p&gt;&#xA;&lt;h1 id=&#34;4-清理安装包&#34;&gt;4. 清理安装包&#xA;&lt;/h1&gt;&lt;p&gt;rm -f grafana_10.4.1_amd64.deb&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;访问 granfana http://ip:3000&lt;/p&gt;&#xA;&lt;h3 id=&#34;添加-loki-数据源&#34;&gt;添加 Loki 数据源&#xA;&lt;/h3&gt;&lt;p&gt;进入主界面后：&lt;/p&gt;&#xA;&lt;ol start=&#34;1&#34; class=&#34;wp-block-list&#34;&gt;&#xA;  &lt;li&gt;&#xA;    点击左侧菜单栏的 &lt;strong&gt;Connections&lt;/strong&gt;（连接图标），然后选择 &lt;strong&gt;Data sources&lt;/strong&gt;（数据源）。&#xA;  &lt;/li&gt;&#xA;  &lt;li&gt;&#xA;    点击右上角的蓝色按钮 &lt;strong&gt;Add data source&lt;/strong&gt;。&#xA;  &lt;/li&gt;&#xA;  &lt;li&gt;&#xA;    在搜索框中输入 &lt;code&gt;Loki&lt;/code&gt;，看到 Loki 图标后点击它进入配置页面。&#xA;  &lt;/li&gt;&#xA;&lt;/ol&gt;&#xA;&lt;h3 id=&#34;第三步填写连接地址&#34;&gt;第三步：填写连接地址&#xA;&lt;/h3&gt;&lt;p&gt;在 Loki 配置表单中，你只需要填写一个地方：&lt;/p&gt;&#xA;&lt;ol start=&#34;1&#34; class=&#34;wp-block-list&#34;&gt;&#xA;  &lt;li&gt;&#xA;    找到 &lt;strong&gt;URL&lt;/strong&gt; 输入框，因为 Loki 和 Grafana 都在这同一台机器上，直接输入本地回环地址即可：&#xA;  &lt;/li&gt;&#xA;&lt;/ol&gt;&lt;figure class=&#34;wp-block-image size-large&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1024&#34; height=&#34;577&#34; src=&#34;http://liangjinzhi.com/wp-content/uploads/2026/06/image-43-1024x577.png&#34; alt=&#34;&#34; class=&#34;wp-image-190&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-43-1024x577.png 1024w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-43-300x169.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-43-768x433.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-43.png 1353w&#34; sizes=&#34;auto, (max-width: 1024px) 100vw, 1024px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;2回到Explore的 &lt;strong&gt;Run query&lt;/strong&gt; 按钮。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-large&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1024&#34; height=&#34;413&#34; src=&#34;http://liangjinzhi.com/wp-content/uploads/2026/06/image-44-1024x413.jpg&#34; alt=&#34;&#34; class=&#34;wp-image-191&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-44-1024x413.jpg 1024w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-44-300x121.jpg 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-44-768x310.jpg 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-44-1536x620.jpg 1536w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-44-2048x827.jpg 2048w&#34; sizes=&#34;auto, (max-width: 1024px) 100vw, 1024px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;ol start=&#34;1&#34; class=&#34;wp-block-list&#34;&gt;&#xA;&lt;/ol&gt;&#xA;&lt;p&gt;现在你就可以在屏幕下方尽情翻阅、搜索和过滤这 500M 历史日志以及动态更新的 FastAPI 实时数据了！看看有没有成功刷出来？&lt;/p&gt;&#xA;&lt;h3 id=&#34;-验收&#34;&gt;🔍 验收&#xA;&lt;/h3&gt;&lt;p&gt;服务启动后，你可以静静等待一会。此时 Promtail 已经在后台把日志数据倒腾给 Loki 了。&lt;/p&gt;&#xA;&lt;p&gt;接下来你就可以登录 &lt;code&gt;http://ip:3000&lt;/code&gt;，在 Explore 里面选择 Loki 数据源，通过 &lt;code&gt;{host=&amp;ldquo;api&amp;rdquo;}&lt;/code&gt; 语法，翻阅配置的日志，再也不需要频繁登录服务器了。&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>一套键鼠操作多终端</title>
            <link>https://liangjinzhi.com/use-one-mouse-keyboard-across-devices/</link>
            <pubDate>Tue, 16 Jun 2026 03:32:07 +0000</pubDate>
            <guid>https://liangjinzhi.com/use-one-mouse-keyboard-across-devices/</guid>
            <description>&lt;p&gt;有时候只有一套键盘鼠标，但是有两个终端需要操作，频繁操作插拨移动键鼠不是很方便操作。这个时候如果可以通过应用程序解决这个问题，何乐而不为呢？&lt;/p&gt;&#xA;&lt;p&gt;这里就引出了input leap&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/input-leap/input-leap&#34;&gt;github&lt;/a&gt;上有介绍：Input Leap 是一款模拟 KVM 切换器功能的软件。传统的 KVM 切换器允许用户使用一套键盘和鼠标，通过旋转 KVM 切换器上的旋钮来控制多台计算机。Input Leap 则通过软件实现这一功能，用户只需将鼠标移动到屏幕边缘，或者按下某个按键即可切换到不同的系统。&lt;/p&gt;&#xA;&lt;h2 id=&#34;准备环境&#34;&gt;准备环境&#xA;&lt;/h2&gt;&lt;p&gt;server:win11，inputleap,有鼠标键盘&lt;/p&gt;&#xA;&lt;p&gt;client:debian13 ，,inputleap,无鼠标键盘&lt;/p&gt;&#xA;&lt;h2 id=&#34;下载链接&#34;&gt;下载链接&#xA;&lt;/h2&gt;&lt;p&gt;&lt;a href=&#34;https://github.com/input-leap/input-leap/releases/download/v3.0.2/InputLeap_3.0.2_windows_qt6.exe&#34;&gt;windows-server&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://github.com/input-leap/input-leap/releases/download/v3.0.2/InputLeap_3.0.2_debian12_amd64.deb&#34;&gt;debian-client&lt;/a&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;安装配置过程&#34;&gt;安装配置过程&#xA;&lt;/h2&gt;&lt;h3 id=&#34;windows安装&#34;&gt;windows安装&#xA;&lt;/h3&gt;&lt;p&gt;没有什么特别就一路默认安装就好了。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;499&#34; height=&#34;392&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-18.png&#34; alt=&#34;&#34; class=&#34;wp-image-97&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-18.png 499w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-18-300x236.png 300w&#34; sizes=&#34;auto, (max-width: 499px) 100vw, 499px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;安装好，桌面生成快捷方式&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;75&#34; height=&#34;74&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-19.png&#34; alt=&#34;&#34; class=&#34;wp-image-98&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;启动并配置Configure Server…&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;512&#34; height=&#34;394&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-20.png&#34; alt=&#34;&#34; class=&#34;wp-image-99&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-20.png 512w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-20-300x231.png 300w&#34; sizes=&#34;auto, (max-width: 512px) 100vw, 512px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;点进去&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;819&#34; height=&#34;582&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-21.png&#34; alt=&#34;&#34; class=&#34;wp-image-100&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-21.png 819w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-21-300x213.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-21-768x546.png 768w&#34; sizes=&#34;auto, (max-width: 819px) 100vw, 819px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;把图标分别进行拖动，确认两个主机之间的位置，最好可以跟实际的屏幕的位置关系一致方便操作，我这里one是windows主机名，debian 是debian的主机名。双击可以修改主机名配置。&lt;/p&gt;&#xA;&lt;h3 id=&#34;debian安装过程&#34;&gt;debian安装过程&#xA;&lt;/h3&gt;&lt;p&gt;&lt;code&gt;sudo apt install ./InputLeap_3.0.2_debian12_amd64.deb -y&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;#完成后直接启动&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;&amp;lt;strong&amp;gt;input-leap&amp;lt;/strong&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;795&#34; height=&#34;510&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-22.png&#34; alt=&#34;&#34; class=&#34;wp-image-101&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-22.png 795w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-22-300x192.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-22-768x493.png 768w&#34; sizes=&#34;auto, (max-width: 795px) 100vw, 795px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;这样就完成了。&lt;/p&gt;&#xA;&lt;h2 id=&#34;排查思路&#34;&gt;排查思路&#xA;&lt;/h2&gt;&lt;p&gt;通过服务管理器查看日志&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;193&#34; height=&#34;176&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-27.png&#34; alt=&#34;&#34; class=&#34;wp-image-111&#34; /&gt; &lt;/figure&gt; &lt;figure class=&#34;wp-block-image size-full&#34;&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;802&#34; height=&#34;403&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-26.png&#34; alt=&#34;&#34; class=&#34;wp-image-109&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-26.png 802w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-26-300x151.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-26-768x386.png 768w&#34; sizes=&#34;auto, (max-width: 802px) 100vw, 802px&#34; /&gt;&lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;如果中途有问题需要停止server并重新配置，排查思路，查看是否监听24800端口&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;netstat -ano |findstr :24800&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;或者通过任务管理器重启服务进程&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;952&#34; height=&#34;445&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-25.png&#34; alt=&#34;&#34; class=&#34;wp-image-104&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-25.png 952w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-25-300x140.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-25-768x359.png 768w&#34; sizes=&#34;auto, (max-width: 952px) 100vw, 952px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>AWS免费服务器申请教程</title>
            <link>https://liangjinzhi.com/how-to-apply-aws-free-tier/</link>
            <pubDate>Wed, 10 Jun 2026 05:19:32 +0000</pubDate>
            <guid>https://liangjinzhi.com/how-to-apply-aws-free-tier/</guid>
            <description>&lt;p&gt;PART1 注册账号&lt;/p&gt;&#xA;&lt;h2 id=&#34;1准备工作&#34;&gt;1.准备工作：&#xA;&lt;/h2&gt;&lt;ul class=&#34;wp-block-list&#34;&gt;&#xA;  &lt;li&gt;&#xA;    &lt;em&gt;说明：&lt;/em&gt;&#xA;  &lt;/li&gt;&#xA;  &lt;li&gt;&#xA;    邮箱地址：建议准备一个未曾关联过AWS的独立邮箱&#xA;  &lt;/li&gt;&#xA;  &lt;li&gt;&#xA;    支付方式：必须是一张支持国际支付的信用（Visa,MasterCard或America Express）&#xA;  &lt;/li&gt;&#xA;  &lt;li&gt;&#xA;    手机号码：用于接收验证码&#xA;  &lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h2 id=&#34;2注册aws账号&#34;&gt;2.注册AWS账号&#xA;&lt;/h2&gt;&lt;p&gt;访问亚马逊官网,&lt;a href=&#34;https://aws.amazon.com/cn/?nc2=h_home&#34;&gt;&lt;a class=&#34;link&#34; href=&#34;https://aws.amazon.com/cn/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://aws.amazon.com/cn/&lt;/a&gt;&lt;/a&gt;，&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-large&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1024&#34; height=&#34;501&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-53-1024x501.avif&#34; alt=&#34;&#34; class=&#34;wp-image-251&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-53-1024x501.avif 1024w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-53-300x147.avif 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-53-768x375.avif 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-53.avif 1475w&#34; sizes=&#34;auto, (max-width: 1024px) 100vw, 1024px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;点击右上角的创建账户（2025年7月15日之后 AWS 改版的新政策只能免费使用6个月了，以前是12个月的）&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;794&#34; height=&#34;659&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-54.avif&#34; alt=&#34;&#34; class=&#34;wp-image-252&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-54.avif 794w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-54-300x249.avif 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-54-768x637.avif 768w&#34; sizes=&#34;auto, (max-width: 794px) 100vw, 794px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;注册过程查收邮箱验证码消息。后续还需要填写联系信息和信用卡信息，同时系统会收一笔小额预授权，后面会退回信用卡账户的。请放心。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;617&#34; height=&#34;467&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-2.png&#34; alt=&#34;&#34; class=&#34;wp-image-76&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-2.png 617w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-2-300x227.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-2-440x333.png 440w&#34; sizes=&#34;auto, (max-width: 617px) 100vw, 617px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;后面大致有5个步骤完成注册。&lt;/p&gt;&#xA;&lt;h3 id=&#34;第1步设置密码&#34;&gt;第1步，设置密码： &lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;651&#34; height=&#34;506&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-3.png&#34; alt=&#34;&#34; class=&#34;wp-image-77&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-3.png 651w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-3-300x233.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-3-440x342.png 440w&#34; sizes=&#34;auto, (max-width: 651px) 100vw, 651px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;第2步填写联系人信息&#34;&gt;第2步，填写联系人信息 &lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;613&#34; height=&#34;581&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-4.png&#34; alt=&#34;&#34; class=&#34;wp-image-78&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-4.png 613w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-4-300x284.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-4-440x417.png 440w&#34; sizes=&#34;auto, (max-width: 613px) 100vw, 613px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;第3步填写账单信息&#34;&gt;第3步，填写账单信息&#xA;&lt;/h3&gt;&lt;p&gt;需要注意免费资源使用超标的话会直接从信用卡里面扣费结算。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;819&#34; height=&#34;749&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-5.png&#34; alt=&#34;&#34; class=&#34;wp-image-79&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-5.png 819w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-5-300x274.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-5-768x702.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-5-440x402.png 440w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-5-680x622.png 680w&#34; sizes=&#34;auto, (max-width: 819px) 100vw, 819px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;第4步验证手机号&#34;&gt;第4步，验证手机号 &lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;/h3&gt;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;784&#34; height=&#34;815&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-6.png&#34; alt=&#34;&#34; class=&#34;wp-image-80&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-6.png 784w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-6-289x300.png 289w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-6-768x798.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-6-440x457.png 440w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-6-680x707.png 680w&#34; sizes=&#34;auto, (max-width: 784px) 100vw, 784px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;第5步选择支持计划&#34;&gt;第5步，选择支持计划&#xA;&lt;/h3&gt;&lt;p&gt;选择免费的基本支持&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;811&#34; height=&#34;862&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-7.png&#34; alt=&#34;&#34; class=&#34;wp-image-81&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-7.png 811w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-7-282x300.png 282w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-7-768x816.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-7-440x468.png 440w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-7-680x723.png 680w&#34; sizes=&#34;auto, (max-width: 811px) 100vw, 811px&#34; /&gt; &lt;/figure&gt; &lt;figure class=&#34;wp-block-image size-full&#34;&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;796&#34; height=&#34;749&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-8.png&#34; alt=&#34;&#34; class=&#34;wp-image-82&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-8.png 796w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-8-300x282.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-8-768x723.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-8-440x414.png 440w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-8-680x640.png 680w&#34; sizes=&#34;auto, (max-width: 796px) 100vw, 796px&#34; /&gt;&lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;到这里就完成注册了，稍后留意一下注册成功的邮件通知。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;631&#34; height=&#34;613&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-9.png&#34; alt=&#34;&#34; class=&#34;wp-image-83&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-9.png 631w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-9-300x291.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-9-440x427.png 440w&#34; sizes=&#34;auto, (max-width: 631px) 100vw, 631px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;PART2 创建EC2实例&lt;/p&gt;&#xA;&lt;p&gt;收到AWS账户激活的邮件后，登录AWS账户控制台，这里我们选择“根用户”，输入邮箱和密码登录。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;949&#34; height=&#34;725&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-11.png&#34; alt=&#34;&#34; class=&#34;wp-image-85&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-11.png 949w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-11-300x229.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-11-768x587.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-11-440x336.png 440w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-11-680x519.png 680w&#34; sizes=&#34;auto, (max-width: 949px) 100vw, 949px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;进入控制台后，选择云服务器所在地区，我这里选择了香港，后面网域的访问或者网络也会更通畅方便一些。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;502&#34; height=&#34;821&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-13.png&#34; alt=&#34;&#34; class=&#34;wp-image-87&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-13.png 502w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-13-183x300.png 183w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-13-440x720.png 440w&#34; sizes=&#34;auto, (max-width: 502px) 100vw, 502px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;创建实例，选择主页中的 “启动实例”，创建第一台EC2实例。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-large&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1024&#34; height=&#34;419&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-14-1024x419.png&#34; alt=&#34;&#34; class=&#34;wp-image-88&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-14-1024x419.png 1024w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-14-300x123.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-14-768x314.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-14-1536x628.png 1536w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-14-440x180.png 440w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-14-680x278.png 680w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-14.png 1787w&#34; sizes=&#34;auto, (max-width: 1024px) 100vw, 1024px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;按自己所需创建免费的镜像&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-large&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1004&#34; height=&#34;1024&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-15-1004x1024.png&#34; alt=&#34;&#34; class=&#34;wp-image-89&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-15-1004x1024.png 1004w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-15-294x300.png 294w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-15-768x783.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-15-440x449.png 440w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-15-680x694.png 680w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-15.png 1096w&#34; sizes=&#34;auto, (max-width: 1004px) 100vw, 1004px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;创建密钥对，自定义一个密钥的名称，私钥文件格式和你使用的ssh工具有关，根据提示选择。创建好之后点击”创建密钥对”弹出文件下载框，自己保存好，后续使用该密钥对进行访问。&lt;/p&gt;&#xA;&lt;p&gt;配置存储&lt;/p&gt;&#xA;&lt;p&gt;免费每月存储容量是30GB，建议按需使用，为避免超额使用，建议只创建一个实例使用。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-large&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1024&#34; height=&#34;410&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-16-1024x410.png&#34; alt=&#34;&#34; class=&#34;wp-image-90&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-16-1024x410.png 1024w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-16-300x120.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-16-768x308.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-16-440x176.png 440w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-16-680x272.png 680w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-16.png 1131w&#34; sizes=&#34;auto, (max-width: 1024px) 100vw, 1024px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;配置好，在右边选择启动实例即可。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;621&#34; height=&#34;533&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-17.png&#34; alt=&#34;&#34; class=&#34;wp-image-91&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-17.png 621w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-17-300x257.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-17-440x378.png 440w&#34; sizes=&#34;auto, (max-width: 621px) 100vw, 621px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;这里在控制台就可以看到启动的实例了。&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-large&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1024&#34; height=&#34;123&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-12-1024x123.png&#34; alt=&#34;&#34; class=&#34;wp-image-86&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/06/image-12-1024x123.png 1024w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-12-300x36.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-12-768x92.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-12-1536x184.png 1536w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-12-2048x246.png 2048w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-12-440x53.png 440w, https://liangjinzhi.com/wp-content/uploads/2026/06/image-12-680x82.png 680w&#34; sizes=&#34;auto, (max-width: 1024px) 100vw, 1024px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;</description>
        </item><item>
            <title>AdguardHome容器化部署</title>
            <link>https://liangjinzhi.com/adguardhome-docker-setup/</link>
            <pubDate>Sat, 30 May 2026 06:23:38 +0000</pubDate>
            <guid>https://liangjinzhi.com/adguardhome-docker-setup/</guid>
            <description>&lt;p&gt;家里有linux主机，于是就想到了现在上网的时候经常有太多的网站会有广告，看看能不能通过自建规则减少广告。听说有AdguardHome可以实现这个功能。那么我们来看看如何部署和使用起来。&lt;/p&gt;&#xA;&lt;h2 id=&#34;概述&#34;&gt;概述&#xA;&lt;/h2&gt;&lt;p&gt;ADGUARDHOME是一款网络级广告和跟踪器拦截DNS服务器，作为一款开源的隐私保护工具，它能够在网络层面为所有设备提供广告过滤和隐私保护功能，无需在每个设备上单独安装客户端软件。通过Docker容器化部署ADGUARDHOME，可以实现快速部署、环境隔离和版本管理，适用于家庭网络、小型企业网络等多种场景。&lt;/p&gt;&#xA;&lt;h2 id=&#34;part1-服务端环境准备&#34;&gt;PART1 服务端环境准备&#xA;&lt;/h2&gt;&lt;p&gt;&lt;code&gt;Debian,docker,AdguardHome镜像源&#xA;主机IP:192.168.5.200&lt;/p&gt;&#xA;&lt;p&gt;镜像源可以自行查找&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;编写Docker-compose.yml&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;services:&#xA;adguardhome:&#xA;image: docker.1ms.run/adguard/adguardhome:v0.107.76&#xA;container_name: adguardhome&#xA;restart: unless-stopped&#xA;# 宿主机目录挂载，确保升级或重启时数据不丢失&#xA;volumes:&#xA;- ./ag_work:/opt/adguardhome/work&#xA;- ./ag_conf:/opt/adguardhome/conf&#xA;ports:&#xA;- &amp;ldquo;53:53/tcp&amp;rdquo;&#xA;- &amp;ldquo;53:53/udp&amp;rdquo;&#xA;- &amp;ldquo;8081:8081/tcp&amp;rdquo;&#xA;- &amp;ldquo;443:443/tcp&amp;rdquo;&#xA;- &amp;ldquo;443:443/udp&amp;rdquo;&#xA;- &amp;ldquo;3000:3000/tcp&amp;rdquo;&lt;/p&gt;&#xA;&lt;p&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;这里因为我本地环境80端口已经启用了，所以把adguardHome的默认80端口修改成8081了。请自行注意&lt;/p&gt;&#xA;&lt;p&gt;启用命令&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;sudo docker compose up -d&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;启动后&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;dog@debian:~/adguard$ docker ps  |grep adguard&#xA;98dd7f0db486   docker.1ms.run/adguard/adguardhome:v0.107.76                                         &amp;ldquo;/opt/adguardhome/Ad…&amp;rdquo;   24 hours ago   Up 16 hours             0.0.0.0:53-&amp;gt;53/tcp, 0.0.0.0:53-&amp;gt;53/udp, [::]:53-&amp;gt;53/tcp, [::]:53-&amp;gt;53/udp, 80/tcp, 67-68/udp, 0.0.0.0:443-&amp;gt;443/tcp, [::]:443-&amp;gt;443/tcp, 853/udp, 853/tcp, 3000/udp, 5443/tcp, 0.0.0.0:3000-&amp;gt;3000/tcp, [::]:3000-&amp;gt;3000/tcp, 0.0.0.0:8081-&amp;gt;8081/tcp, 0.0.0.0:443-&amp;gt;443/udp, [::]:8081-&amp;gt;8081/tcp, [::]:443-&amp;gt;443/udp, 5443/udp, 6060/tcp   adguardhome&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;访问首页，并设置密码&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-large&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1024&#34; height=&#34;629&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/05/image-1024x629.png&#34; alt=&#34;&#34; class=&#34;wp-image-40&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/05/image-1024x629.png 1024w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-300x184.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-768x472.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-1536x943.png 1536w, https://liangjinzhi.com/wp-content/uploads/2026/05/image.png 1601w&#34; sizes=&#34;auto, (max-width: 1024px) 100vw, 1024px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;回到首页-设置-dns设置&#34;&gt;回到首页-设置-DNS设置&#xA;&lt;/h2&gt;&lt;p&gt;设置上游DNS服务器，直接粘贴&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;https://dns.alidns.com/dns-query&#xA;&lt;a class=&#34;link&#34; href=&#34;https://doh.pub/dns-query&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://doh.pub/dns-query&lt;/a&gt;&#xA;&lt;a class=&#34;link&#34; href=&#34;https://doh.360.cn/dns-query&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://doh.360.cn/dns-query&lt;/a&gt;&#xA;114.114.114.114&#xA;223.5.5.5&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;h3 id=&#34;bootstrap-dns-服务器&#34;&gt;Bootstrap DNS 服务器&#xA;&lt;/h3&gt;&lt;p&gt;&lt;code&gt;223.5.5.5&#xA;119.29.29.29&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;p&gt;点击保存&lt;/p&gt;&#xA;&lt;h3 id=&#34;回到过滤器自定义过滤规则&#34;&gt;回到过滤器，自定义过滤规则&#xA;&lt;/h3&gt;&lt;p&gt;通过指定域名进行拦截，demo如下&lt;/p&gt;&#xA;&lt;p&gt;&lt;code&gt;||dns.weixin.qq.com.cn^&lt;/p&gt;&#xA;&lt;p&gt;应用即可&lt;/code&gt;&lt;/pre&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;part2-路由器&#34;&gt;PART2 路由器&#xA;&lt;/h2&gt;&lt;p&gt;以中兴路由器为例，网络-配置DNS服务器为服务器端的IP。（我这里是192.168.5.200）&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-large&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1024&#34; height=&#34;511&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/05/image-2-1024x511.png&#34; alt=&#34;&#34; class=&#34;wp-image-47&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/05/image-2-1024x511.png 1024w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-2-300x150.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-2-768x383.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-2-1536x767.png 1536w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-2.png 1623w&#34; sizes=&#34;auto, (max-width: 1024px) 100vw, 1024px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;part3-终端电脑&#34;&gt;PART3 终端电脑&#xA;&lt;/h2&gt;&lt;p&gt;以win10/win11为例&lt;/p&gt;&#xA;&lt;p&gt;1.按下 Win + R 键，输入 cmd 并按 Enter 打开命令提示符。&lt;br /&gt;2.输入ipconfig /flushdns 刷新DNS缓存&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full is-resized&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;494&#34; height=&#34;311&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/05/image-3.png&#34; alt=&#34;&#34; class=&#34;wp-image-48&#34; style=&#34;width:532px;height:auto&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/05/image-3.png 494w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-3-300x189.png 300w&#34; sizes=&#34;auto, (max-width: 494px) 100vw, 494px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;p&gt;刷新后，你可以通过以下命令查看当前电脑实际使用的 DNS 服务器地址，确保它确实是你设置的 AdGuardHome 主机 IP&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-full&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;355&#34; height=&#34;241&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/05/image-4.png&#34; alt=&#34;&#34; class=&#34;wp-image-49&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/05/image-4.png 355w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-4-300x204.png 300w&#34; sizes=&#34;auto, (max-width: 355px) 100vw, 355px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;  &lt;br /&gt;&#xA;&lt;h2 id=&#34;查看效果&#34;&gt;查看效果&#xA;&lt;/h2&gt;&lt;p&gt;通过电脑任意访问一个网站如&lt;a href=&#34;https://news.qq.com/&#34;&gt;&lt;a class=&#34;link&#34; href=&#34;https://news.qq.com/&#34;  target=&#34;_blank&#34; rel=&#34;noopener&#34;&#xA;    &gt;https://news.qq.com/&lt;/a&gt;&lt;/a&gt; 回到查询日志-选择已过滤&lt;/p&gt;&#xA;&lt;figure class=&#34;wp-block-image size-large&#34;&gt;&#xA;&lt;p&gt;&lt;img loading=&#34;lazy&#34; decoding=&#34;async&#34; width=&#34;1024&#34; height=&#34;492&#34; src=&#34;https://liangjinzhi.com/wp-content/uploads/2026/05/image-1-1024x492.png&#34; alt=&#34;&#34; class=&#34;wp-image-42&#34; srcset=&#34;https://liangjinzhi.com/wp-content/uploads/2026/05/image-1-1024x492.png 1024w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-1-300x144.png 300w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-1-768x369.png 768w, https://liangjinzhi.com/wp-content/uploads/2026/05/image-1.png 1534w&#34; sizes=&#34;auto, (max-width: 1024px) 100vw, 1024px&#34; /&gt; &lt;/figure&gt;&lt;/p&gt;&#xA;&lt;h2 id=&#34;参考资料&#34;&gt;参考资料&#xA;&lt;/h2&gt;&lt;p&gt;&lt;a href=&#34;https://github.com/SeanChang/xuanyuan_docker_proxy/blob/main/blog/adguardhome-docker.md#adguardhome-docker-%E5%AE%B9%E5%99%A8%E5%8C%96%E9%83%A8%E7%BD%B2%E6%8C%87%E5%8D%97&#34;&gt;AdguardHome Docker 容器化部署指南&lt;/a&gt;&lt;/p&gt;&#xA;</description>
        </item></channel>
</rss>
