<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Linux on 风言风语</title><link>https://1.122915.xyz/tags/linux/</link><description>神仙阿旺的个人博客 - 记录技术实践与生活感悟 风言风语</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>神仙阿旺</managingEditor><webMaster>神仙阿旺</webMaster><copyright/><lastBuildDate>Mon, 29 Jun 2026 22:34:16 +0800</lastBuildDate><atom:link href="https://1.122915.xyz/tags/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>Restic使用</title><link>https://1.122915.xyz/posts/restic%E4%BD%BF%E7%94%A8/</link><pubDate>Mon, 29 Jun 2026 22:34:16 +0800</pubDate><author>神仙阿旺</author><guid>https://1.122915.xyz/posts/restic%E4%BD%BF%E7%94%A8/</guid><description>&lt;img src="https://66.122915.xyz/i/2026/06/29/20260629234607891-0.webp" alt="20260629234607891" loading="lazy" style="width:100%;max-width:var(--size);height:auto;display:block;--size:600px;">
&lt;p>&lt;mark style="background:#f38181">借鉴或引用的文章：&lt;/mark>&lt;/p>
&lt;ul>
&lt;li>&lt;a href="https://alistgo.com/zh/">Home | AList文档&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://doc.oplist.org/guide/advanced/s3">对象存储 - OpenList 文档&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.tangyuecan.com/2024/12/26/%E4%BD%8E%E6%88%90%E6%9C%AC%E7%9A%84%E6%95%B0%E6%8D%AE%E5%A4%87%E4%BB%BD%E6%96%B9%E6%A1%88#%E5%AE%89%E8%A3%85restic">低成本的数据备份方案 | 唐玥璨&lt;/a>&lt;/li>
&lt;li>&lt;a href="https://www.tangyuecan.com/2025/03/03/vim%E6%98%AF%E6%9C%80%E5%BC%BA%E4%BB%A3%E7%A0%81%E7%BC%96%E8%BE%91%E5%99%A8">Vim是最强代码编辑器 | 唐玥璨&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;a href="https://restic.net/">Restic&lt;/a>工具是一个自带快照的备份工具，不仅仅可以实现增量备份、取消存储冗余、压缩备份，同时在备份过程中可以实现对文件权限、软连接等等属性的全量保存，最关键的是对海量小文件在备份时候会被整合为固定大小的块进行存储，所以无论原始文件是什么样子，最终备份后的文件是一堆特定大小的块的文件。&lt;/p>
&lt;p>这样的特性使得这个东西非常适合云备份和迁移海量小文件的，一方面特定大小的块包装最终输出的文件的数量既不会特别大，也不会特别多；&lt;/p>
&lt;p>具体的操作方案如下：&lt;/p>
&lt;h2 id="安装restic">安装Restic&lt;/h2>
&lt;p>&lt;mark style="background:rgba(240, 200, 0, 0.2)">以Debian的系统为例：&lt;/mark>&lt;/p>
&lt;div class="code-block-container">&lt;div class="code-block-header">
&lt;div class="code-block-header-left">&lt;div class="code-block-dots" aria-hidden="true">
&lt;span class="code-block-dot red">&lt;/span>
&lt;span class="code-block-dot yellow">&lt;/span>
&lt;span class="code-block-dot green">&lt;/span>
&lt;/div>
&lt;span class="lang-label">code&lt;/span>
&lt;/div>
&lt;button class="copy-button" type="button" onclick="copyCode(event, this)" aria-label="复制代码">
&lt;i class="fa-regular fa-copy">&lt;/i>
&lt;span>复制&lt;/span>
&lt;/button>
&lt;/div>&lt;div class="code-content-wrapper">
&lt;pre tabindex="0">&lt;code># 更新并安装 restic
apt update &amp;amp;&amp;amp; apt install restic -y
# 验证安装是否成功
restic version&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h2 id="初始化仓库">初始化仓库&lt;/h2>
&lt;p>我喜欢直接创建一个&lt;code>config&lt;/code>文件，方便加载变量。&lt;/p>
&lt;div class="code-block-container">&lt;div class="code-block-header">
&lt;div class="code-block-header-left">&lt;div class="code-block-dots" aria-hidden="true">
&lt;span class="code-block-dot red">&lt;/span>
&lt;span class="code-block-dot yellow">&lt;/span>
&lt;span class="code-block-dot green">&lt;/span>
&lt;/div>
&lt;span class="lang-label">code&lt;/span>
&lt;/div>
&lt;button class="copy-button" type="button" onclick="copyCode(event, this)" aria-label="复制代码">
&lt;i class="fa-regular fa-copy">&lt;/i>
&lt;span>复制&lt;/span>
&lt;/button>
&lt;/div>&lt;div class="code-content-wrapper">
&lt;pre tabindex="0">&lt;code># 创建存储变量目录
mkdir -p /opt/restic
# 创建专门负责图床对象存储的config
vim /opt/restic/restic_tuchuang.sh&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;p>&lt;code>VIM&lt;/code>使用教程&lt;a href="https://www.cnblogs.com/clnchanpin/p/19316690#%E7%A4%BA%E4%BE%8B%202%EF%BC%9A%E5%88%9B%E5%BB%BA%E5%B9%B6%E6%89%93%E5%BC%80%E6%96%B0%E6%96%87%E4%BB%B6">点击直达&lt;/a>&lt;/p>
&lt;p>&lt;mark style="background:#f38181">下入如下内容：&lt;/mark>&lt;/p>
&lt;div class="code-block-container">&lt;div class="code-block-header">
&lt;div class="code-block-header-left">&lt;div class="code-block-dots" aria-hidden="true">
&lt;span class="code-block-dot red">&lt;/span>
&lt;span class="code-block-dot yellow">&lt;/span>
&lt;span class="code-block-dot green">&lt;/span>
&lt;/div>
&lt;span class="lang-label">code&lt;/span>
&lt;/div>
&lt;button class="copy-button" type="button" onclick="copyCode(event, this)" aria-label="复制代码">
&lt;i class="fa-regular fa-copy">&lt;/i>
&lt;span>复制&lt;/span>
&lt;/button>
&lt;/div>&lt;div class="code-content-wrapper">
&lt;pre tabindex="0">&lt;code># S3 访问密钥 ID
export AWS_ACCESS_KEY_ID=&amp;#34;JsZgU0XkYY8QgnbY4utC&amp;#34;
# S3 访问密钥
export AWS_SECRET_ACCESS_KEY=&amp;#34;beNK/clOe/Bomg8Fb+7rbssL9fLgC2b7Oe01gs+&amp;#34;
# Restic 客户端数据加密密码
export RESTIC_PASSWORD=&amp;#34;123456789&amp;#34;
# 备份存储库路径（桶名是 openlist，后面接中文测试文件夹）
export RESTIC_REPOSITORY=&amp;#34;s3:http://100.100.1.8:5246/openlist/玩客云备份/图床&amp;#34;&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;p>&lt;mark style="background:#f38181">配置文件创建好后，必须分别引入并初始化一次：&lt;/mark>&lt;/p></description></item><item><title>极轻量私有图床系统</title><link>https://1.122915.xyz/posts/%E8%87%AA%E5%BB%BA%E5%9B%BE%E5%BA%8A/</link><pubDate>Fri, 19 Jun 2026 14:24:26 +0800</pubDate><author>神仙阿旺</author><guid>https://1.122915.xyz/posts/%E8%87%AA%E5%BB%BA%E5%9B%BE%E5%BA%8A/</guid><description>&lt;p>极轻量私有图床系统技术方案书 v2.0&lt;/p>
&lt;p>&lt;strong>版本：v2.0 最终版&lt;/strong> &lt;strong>发布日期：2026 年 6 月 15 日&lt;/strong>&lt;/p>
&lt;hr>
&lt;h2 id="一项目背景与概述">一、项目背景与概述&lt;/h2>
&lt;p>随着企业数字化内容管理需求的增加，高频次、零延迟的图片资产存储与分发成为核心诉求。传统图床方案（如基于 Node.js 或 Python 的标准 Web 服务）普遍存在内存占用高、依赖复杂、维护成本高等痛点。&lt;/p>
&lt;p>本方案提出并设计了一款工业级极轻量私有图床系统。该系统基于 Golang 语言原生开发，专门针对低资源环境（如轻量云服务器、ARM 架构边缘设备）进行了深度优化，旨在提供一个高安全、高性能、零依赖、扁平化维护的图片存储与直链分发解决方案，完美适配 PicList 等主流图床客户端。&lt;/p>
&lt;h3 id="项目定位">项目定位&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>目标设备&lt;/strong>：玩客云、树莓派、轻量云服务器等低配置设备&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>核心优势&lt;/strong>：内存占用仅 8-15MB、单文件部署、零外部依赖&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>设计理念&lt;/strong>：功能模块化、开关化、默认关闭、按需开启&lt;/p>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="二核心设计指标">二、核心设计指标&lt;/h2>
&lt;h3 id="1-资源与性能指标硬性底线">1. 资源与性能指标（硬性底线）&lt;/h3>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;th>&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>指标项&lt;/td>
&lt;td>设计目标&lt;/td>
&lt;td>实际达成&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>闲置内存常驻&lt;/td>
&lt;td>≤ 15MB&lt;/td>
&lt;td>&lt;strong>8-12MB&lt;/strong> ✅&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>峰值内存控制&lt;/td>
&lt;td>≤ 25MB&lt;/td>
&lt;td>&lt;strong>15-25MB&lt;/strong> ✅&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>二进制体积&lt;/td>
&lt;td>≤ 10MB&lt;/td>
&lt;td>&lt;strong>6.5-6.7MB&lt;/strong> ✅&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>单一进程架构&lt;/td>
&lt;td>无额外子进程&lt;/td>
&lt;td>✅ 纯单进程&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;h3 id="2-部署与兼容性指标">2. 部署与兼容性指标&lt;/h3>
&lt;ul>
&lt;li>
&lt;p>&lt;strong>全架构原生支持&lt;/strong>：amd64 /arm64 /armv7（玩客云专用）&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>纯静态二进制&lt;/strong>：无动态链接库依赖（ldd 显示 &lt;code>not a dynamic executable&lt;/code>）&lt;/p>
&lt;/li>
&lt;li>
&lt;p>&lt;strong>零配置即点即运行&lt;/strong>：首次运行自动释放标准配置文件&lt;/p>
&lt;/li>
&lt;/ul>
&lt;hr>
&lt;h2 id="三系统核心架构与功能设计">三、系统核心架构与功能设计&lt;/h2>
&lt;h3 id="1-完整功能开关矩阵v20-新增">1. 完整功能开关矩阵（v2.0 新增）&lt;/h3>
&lt;p>所有功能&lt;strong>默认全部关闭&lt;/strong>，用户可在 &lt;code>config.json&lt;/code> 中按需独立开启：&lt;/p></description></item><item><title>搭建博客思路</title><link>https://1.122915.xyz/posts/%E6%90%AD%E5%BB%BA%E5%8D%9A%E5%AE%A2%E6%80%9D%E8%B7%AF/</link><pubDate>Sun, 22 Mar 2026 14:10:11 +0800</pubDate><author>神仙阿旺</author><guid>https://1.122915.xyz/posts/%E6%90%AD%E5%BB%BA%E5%8D%9A%E5%AE%A2%E6%80%9D%E8%B7%AF/</guid><description>&lt;h3 id="说明">说明&lt;/h3>
&lt;p>本篇文章整理&lt;font color="#dd1399">&lt;code>Linux&lt;/code>&lt;/font>下搭建博客&lt;span style="background:rgba(240, 200, 0, 0.2)">思路&lt;/span>过程与&lt;span style="background:rgba(240, 200, 0, 0.2)">实操&lt;/span>。&lt;/p>
&lt;p>我刚开始使用的是虚拟主机无脑搭建的博客，后来感觉性能太弱就想着使用本地服务器来改善这个问题，提高体验，
奈何囊中羞涩，只买了一个 &lt;span style="background:rgba(240, 107, 5, 0.2)">&lt;code>onecloud&lt;/code>&lt;/span> ,体验和自由度缺少舒服了一些，但是折腾精神是一把火，而不会轻易熄灭的！！
&lt;img src="https://image-h5-cdn.dewu.com/app/2024/community/1749713138_modelLGE-AN00model_byte109100byte_7875599ee283b80f477b9750e952bf9a_du_android_w1080_h1306.webp" alt="小暑" width="120" />&lt;/p>
&lt;p>哎说都是泪，我只是想给我的所思所想找一个安稳的家。&lt;/p>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>虚拟主机&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>说明&lt;/td>
&lt;td>囊中羞涩，使用的都是free版本，付费的版本还不如去买VPS&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>好处&lt;/td>
&lt;td>稳定，免费，适合长时间运行省事&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>缺点&lt;/td>
&lt;td>时间长了就依赖平台了，上传限制，下载限制，备份不好备份&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>本地服务器&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>说明&lt;/td>
&lt;td>我是优选考虑本地服务器的&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>好处&lt;/td>
&lt;td>完全的自主控制，我可以随心所欲，不管是拓展优化还是备份都非常好&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>缺点&lt;/td>
&lt;td>我并没有公网IP，即便有我也不想使用家宽来搭建博客。同时我希望可以https访问我的博客&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;table>
&lt;thead>
&lt;tr>
&lt;th>&lt;/th>
&lt;th>购买服务器&lt;/th>
&lt;/tr>
&lt;/thead>
&lt;tbody>
&lt;tr>
&lt;td>说明&lt;/td>
&lt;td>怎么说呢，不管是国内的还是国外的，价格我都可以负担的起。但是我喜欢折腾，不是安生的主&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>好处&lt;/td>
&lt;td>好处当然是稳定+无限制，毕竟是掏钱买服务的，用着确实舒心&lt;/td>
&lt;/tr>
&lt;tr>
&lt;td>缺点&lt;/td>
&lt;td>国内必须备案，不然国内服务无法使用，同时折腾不了&lt;/td>
&lt;/tr>
&lt;/tbody>
&lt;/table>
&lt;p>现在实操正式开始，时间为：&lt;span style="background:rgba(240, 200, 0, 0.2)">&lt;strong>2025-07-18 21:47:17&lt;/strong>&lt;/span>
&lt;span style="background:#f38181">暂定流程如下：&lt;/span>&lt;/p>
&lt;div class="code-block-container">&lt;div class="code-block-header">
&lt;div class="code-block-header-left">&lt;div class="code-block-dots" aria-hidden="true">
&lt;span class="code-block-dot red">&lt;/span>
&lt;span class="code-block-dot yellow">&lt;/span>
&lt;span class="code-block-dot green">&lt;/span>
&lt;/div>
&lt;span class="lang-label">code&lt;/span>
&lt;/div>
&lt;button class="copy-button" type="button" onclick="copyCode(event, this)" aria-label="复制代码">
&lt;i class="fa-regular fa-copy">&lt;/i>
&lt;span>复制&lt;/span>
&lt;/button>
&lt;/div>&lt;div class="code-content-wrapper">
&lt;pre tabindex="0">&lt;code>graph TD
A[开始] --&amp;gt; B[系统更新]
B --&amp;gt; C[安装Nginx]
C --&amp;gt; D[安装数据库]
D --&amp;gt; E[配置数据库]
E --&amp;gt; F[安装PHP]
F --&amp;gt; G[下载WordPress]
G --&amp;gt; H[配置WordPress]
H --&amp;gt; I[配置Nginx站点]
I --&amp;gt; J[设置文件权限]
J --&amp;gt; K[完成安装向导]
K --&amp;gt; L[博客搭建完成]&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h3 id="准备系统">准备系统&lt;/h3>
&lt;p>我先开始使用 &lt;font color="#dd1399">VMware Workstation Pro&lt;/font> 虚拟机来安装一个server服务器系统，为了快速安装使用「 &lt;font color="#dd1399">Ubuntu&lt;/font> 」。&lt;/p></description></item><item><title>Linux SSH配置</title><link>https://1.122915.xyz/posts/ssh%E7%99%BB%E9%99%86/</link><pubDate>Sun, 22 Feb 2026 23:20:00 +0800</pubDate><author>神仙阿旺</author><guid>https://1.122915.xyz/posts/ssh%E7%99%BB%E9%99%86/</guid><description>&lt;h3 id="1-配置文件内容">1. 配置文件内容&lt;/h3>
&lt;div class="code-block-container">&lt;div class="code-block-header">
&lt;div class="code-block-header-left">&lt;div class="code-block-dots" aria-hidden="true">
&lt;span class="code-block-dot red">&lt;/span>
&lt;span class="code-block-dot yellow">&lt;/span>
&lt;span class="code-block-dot green">&lt;/span>
&lt;/div>
&lt;span class="lang-label">code&lt;/span>
&lt;/div>
&lt;button class="copy-button" type="button" onclick="copyCode(event, this)" aria-label="复制代码">
&lt;i class="fa-regular fa-copy">&lt;/i>
&lt;span>复制&lt;/span>
&lt;/button>
&lt;/div>&lt;div class="code-content-wrapper">
&lt;pre tabindex="0">&lt;code># This is the sshd server system-wide configuration file. See
# sshd_config(5) for more information.
# This sshd was compiled with PATH=/usr/local/bin:/usr/bin:/bin:/usr/games
# 策略说明：默认配置尽可能保留注释，取消注释的选项表示覆盖默认值
# 包含额外配置文件（通常用于细分配置）
Include /etc/ssh/sshd_config.d/*.conf
# SSH服务监听端口（默认22，取消注释明确指定）
Port 22
# 地址族限制（any=同时支持IPv4和IPv6，可改为inet仅IPv4或inet6仅IPv6）
AddressFamily any
# 监听地址（0.0.0.0=监听所有IPv4地址；::=监听所有IPv6地址）
ListenAddress 0.0.0.0
ListenAddress ::
# 主机密钥文件路径（默认自动生成，无需修改）
HostKey /etc/ssh/ssh_host_rsa_key
HostKey /etc/ssh/ssh_host_ecdsa_key
HostKey /etc/ssh/ssh_host_ed25519_key
# 密钥重协商限制（默认值，无需修改）
#RekeyLimit default none
# 日志配置（开启详细日志，便于排查登录问题）
SyslogFacility AUTH
LogLevel VERBOSE # 详细日志，排查问题更方便
# 认证相关配置
# 登录宽限时间（用户输入密码的超时时间，默认2分钟）
LoginGraceTime 2m
# 允许root用户直接登录
PermitRootLogin yes
# 严格模式（检查用户主目录和密钥文件权限）
StrictModes yes
# 最大认证尝试次数（降低为3次，减少暴力破解风险）
MaxAuthTries 3
# 每个网络连接的最大会话数（默认10）
MaxSessions 10
# 禁用公钥认证【核心修改：取消密钥登录】
PubkeyAuthentication no
# 公钥认证的密钥文件路径（禁用后此配置不生效，保留注释）
AuthorizedKeysFile .ssh/authorized_keys .ssh/authorized_keys2
#AuthorizedPrincipalsFile none
#AuthorizedKeysCommand none
#AuthorizedKeysCommandUser nobody
# 基于主机的认证（默认关闭，安全性低）
#HostbasedAuthentication no
#IgnoreUserKnownHosts no
#IgnoreRhosts yes
# 启用密码认证【核心修改：恢复密码登录】
PasswordAuthentication yes
# 禁止空密码登录（安全项，必须设为no）
PermitEmptyPasswords no
# 挑战响应认证（如PAM认证，默认关闭）
KbdInteractiveAuthentication no
# Kerberos相关配置（无需使用则保持默认）
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no
# GSSAPI相关配置（无需使用则保持默认）
#GSSAPIAuthentication no
#GSSAPICleanupCredentials yes
#GSSAPIStrictAcceptorCheck yes
#GSSAPIKeyExchange no
# 启用PAM认证（与密码认证配合使用，需开启）
UsePAM yes
# 允许代理转发（默认开启）
#AllowAgentForwarding yes
# 允许TCP转发（默认开启）
#AllowTcpForwarding yes
# 允许远程主机连接本地转发端口（默认关闭，安全项）
#GatewayPorts no
# 启用X11转发（图形界面转发，默认开启）
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
# 允许TTY终端（默认开启）
#PermitTTY yes
# 登录时不显示motd信息（关闭欢迎信息）
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
#PermitUserEnvironment no
#Compression delayed
# 客户端存活检测（提升连接稳定性）
ClientAliveInterval 300
ClientAliveCountMax 3
# 禁用DNS反向解析（加速SSH连接）
UseDNS no
#PidFile /run/sshd.pid
#MaxStartups 10:30:100
#PermitTunnel no
#ChrootDirectory none
#VersionAddendum none
# 登录横幅（可自定义提示信息，默认关闭）
#Banner none
# 允许客户端传递locale环境变量
AcceptEnv LANG LC_*
# SFTP子系统配置（默认路径，无需修改）
Subsystem sftp /usr/lib/openssh/sftp-server
# 按用户自定义配置示例（无需则注释）
#Match User anoncvs
# X11Forwarding no
# AllowTcpForwarding no
# PermitTTY no
# ForceCommand cvs server&lt;/code>&lt;/pre>
&lt;/div>
&lt;/div>
&lt;h3 id="2-核心配置逻辑拆解">2. 核心配置逻辑拆解&lt;/h3>
&lt;p>这份文件与默认配置相比，主要的变动点如下：&lt;/p></description></item></channel></rss>