<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
    <channel>
        <title>云上笔记</title>
        <link>https://tangly1024.com/</link>
        <description>记录互联网的技术大杂烩</description>
        <lastBuildDate>Mon, 09 Feb 2026 12:43:37 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <language>zh-CN</language>
        <copyright>All rights reserved 2026, Brill</copyright>
        <item>
            <title><![CDATA[树莓派打造晨报电台闹钟，让电台轻轻的叫你起床]]></title>
            <link>https://tangly1024.com/article/raspberrypi-alarmclock</link>
            <guid>https://tangly1024.com/article/raspberrypi-alarmclock</guid>
            <pubDate>Tue, 28 Mar 2017 00:00:00 GMT</pubDate>
            <description><![CDATA[16年入了一个树莓派B+版折腾了一下就放在角落里积灰了，我这天天总睡懒觉的人被冰冷的闹钟吓得激醒是非常痛苦的，某天打扫房间发现了被我打入冷宫的树莓派就顺手拿出来打造成淡入闹钟+晨起天气预报+晚间电台播放]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-a0ef5c64844a4fbfa6892ed196f9d6da"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-5d877e82428b47299fda44b64923d54c"><div>16年入了一个树莓派B+版折腾了一下就放在角落里积灰了，我这天天总睡懒觉的人被冰冷的闹钟吓得激醒是非常痛苦的，某天打扫房间发现了被我打入冷宫的树莓派就顺手拿出来打造成淡入闹钟+晨起天气预报+晚间电台播放。</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-0ac226b5e16b46adb20383352251f862" data-id="0ac226b5e16b46adb20383352251f862"><span><div id="0ac226b5e16b46adb20383352251f862" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0ac226b5e16b46adb20383352251f862" title="简介"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">简介</span></span></h3><div class="notion-text notion-block-65e844c12ebe4271a047106846a6f7a9">· 早上7点定时从低音量的<a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://www.qpgfm.com/">青苹果</a>电台（早上电台没有节目，只有音乐）逐步提升音量轻轻的音乐声叫你起床，3分钟后语音播放今天的天气预报，一个小时后结束播放。
· 晚上10点开始低音量播放<a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://www.qpgfm.com/">青苹果</a>电台（现在电台播放情感节目）提醒你准备碎觉了，最后一个小时候结束播放并对你说声晚安！</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-5c76211ecff1469e9d633b42d6359aef" data-id="5c76211ecff1469e9d633b42d6359aef"><span><div id="5c76211ecff1469e9d633b42d6359aef" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5c76211ecff1469e9d633b42d6359aef" title="准备工作"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">准备工作</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-f324d0b2d6ff4ae18cddb54fc4de4049" data-id="f324d0b2d6ff4ae18cddb54fc4de4049"><span><div id="f324d0b2d6ff4ae18cddb54fc4de4049" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f324d0b2d6ff4ae18cddb54fc4de4049" title="必要材料"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">必要材料</span></span></h4><div class="notion-text notion-block-42132ebb2b1c436c82d260302c603f6c">1.聪明大脑一坨
2.能上网的树莓派一个
3.能响的线圈</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2878adee6e5a4e768d33b7c8f627e212" data-id="2878adee6e5a4e768d33b7c8f627e212"><span><div id="2878adee6e5a4e768d33b7c8f627e212" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2878adee6e5a4e768d33b7c8f627e212" title="安装树莓派系统"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装树莓派系统</span></span></h4><div class="notion-text notion-block-31d9d015ce9c4acfa997240018f1b53f">本文采用的是树莓派官方指定系统，小白of圣手党推荐使用好方便照葫芦画瓢是吧。
这里就不教了，网上一搜一大堆的教程。
· <a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://jingyan.baidu.com/article/636f38bb5f52e9d6b84610e5.html">百度经验</a>
· <a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://www.cnblogs.com/rond/p/4970071.html">树莓派入手体验和系统安装</a>
· <a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://blog.csdn.net/u011388550/article/details/49981703">树莓派入门之装系统</a></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-8568170214744348a264c2b62506fa5b" data-id="8568170214744348a264c2b62506fa5b"><span><div id="8568170214744348a264c2b62506fa5b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8568170214744348a264c2b62506fa5b" title="安装必要程序"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装必要程序</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-7b42a02047164db7bdcabde034fe1eed" data-id="7b42a02047164db7bdcabde034fe1eed"><span><div id="7b42a02047164db7bdcabde034fe1eed" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7b42a02047164db7bdcabde034fe1eed" title="Vlc 播放器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Vlc 播放器</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-122052866a484407b14c63c87618ff5e" data-id="122052866a484407b14c63c87618ff5e"><span><div id="122052866a484407b14c63c87618ff5e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#122052866a484407b14c63c87618ff5e" title="Mplayer 播放器"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Mplayer 播放器</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-26cbaf3b3f5c4f7cbea3a34d6b0451af" data-id="26cbaf3b3f5c4f7cbea3a34d6b0451af"><span><div id="26cbaf3b3f5c4f7cbea3a34d6b0451af" class="notion-header-anchor"></div><a class="notion-hash-link" href="#26cbaf3b3f5c4f7cbea3a34d6b0451af" title="Cron 计划任务"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Cron 计划任务</span></span></h4><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-64b6470451b3485db0cb8e48915b4076" data-id="64b6470451b3485db0cb8e48915b4076"><span><div id="64b6470451b3485db0cb8e48915b4076" class="notion-header-anchor"></div><a class="notion-hash-link" href="#64b6470451b3485db0cb8e48915b4076" title="开始部署"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">开始部署</span></span></h3><div class="notion-text notion-block-5206e1f20ed44c6886cc13eac8b3c222">&lt;ins/&gt;</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-0dd72f04bba544af867f6130a3ffc99c" data-id="0dd72f04bba544af867f6130a3ffc99c"><span><div id="0dd72f04bba544af867f6130a3ffc99c" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0dd72f04bba544af867f6130a3ffc99c" title="获取代码"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">获取代码</span></span></h4><div class="notion-text notion-block-ff5a28ee7ada4a2ebc6f17f9ca38ab97">下载我上传的代码  <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/Hscpro/Morning.git">Github</a>  <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://git.coding.net/Hscpro/Morning.git">Coding</a>
将<b>Morning</b>文件夹上传到树莓派的<b>Home</b>文件夹里</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-5236d70373bf46dd89a402c8486c40f7" data-id="5236d70373bf46dd89a402c8486c40f7"><span><div id="5236d70373bf46dd89a402c8486c40f7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5236d70373bf46dd89a402c8486c40f7" title="修改文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">修改文件</span></span></h4><div class="notion-text notion-block-02a4c0926b2644a8b14fc8877d7e900f">申请和风天气KEY <a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://www.heweather.com/">申请地址</a>，申请百度开发者语音转换a/s key <a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://yuyin.baidu.com/">申请地址</a>
修改 Morning/weather.py 文件第31/65行处的“和风天气KEY”替换为你的和风天气KEY</div><div class="notion-text notion-block-8048b82000f644bab4e52be7f16e21f4">修改 Morning/weather.py 文件第82/83行处的“百度开发api_key/百度开发sec_key”替换为你的百度开发api_key/百度开发sec_key</div><div class="notion-text notion-block-1e0b087518434348b315a81b3a62302b">修改 Morning/weather.py 文件第93行的城市代码为你所在的城市的代码。 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://www.heweather.com/documents/city">城市代码列表</a></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1678f37f58284043a944ea88dc7e4f09" data-id="1678f37f58284043a944ea88dc7e4f09"><span><div id="1678f37f58284043a944ea88dc7e4f09" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1678f37f58284043a944ea88dc7e4f09" title="修改其他参数"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">修改其他参数</span></span></h4><div class="notion-text notion-block-0a7a6767a13640b5b5e6d71b7e4d3114">可以适当修改Morning.sh和Evening.sh文件、更换电台，设置播放时间，音量等里面的注释都写得很清楚了，这里不详细介绍了。
比如
·  修改 Morning/Morning.sh与Evening.sh 文件的“sleep 60m”可以确定播放电台多久
·  修改 Morning/Morning.sh与Evening.sh 文件的 “<a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://hls.qingting.fm/live/4576.m3u8?bitrate=64%E2%80%9D%E5%8F%AF%E4%BB%A5%E6%9B%B4%E6%8D%A2%E7%BD%91%E7%BB%9C%E7%94%B5%E5%8F%B0">http://hls.qingting.fm:80/live/4576.m3u8?bitrate=64”可以更换网络电台</a>
·  修改 --equalizer-bands=&quot;8 3 0 -2 -1 0.5 1.5 0.5 3 1.5&quot; 可以设定播放器的均衡器</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-4d08be5441b94dcd8707976d5f580a7d" data-id="4d08be5441b94dcd8707976d5f580a7d"><span><div id="4d08be5441b94dcd8707976d5f580a7d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4d08be5441b94dcd8707976d5f580a7d" title="给予执行权限"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">给予执行权限</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-cabb437fc2574d2f9bc1ec4576fc7d13" data-id="cabb437fc2574d2f9bc1ec4576fc7d13"><span><div id="cabb437fc2574d2f9bc1ec4576fc7d13" class="notion-header-anchor"></div><a class="notion-hash-link" href="#cabb437fc2574d2f9bc1ec4576fc7d13" title="添加计划任务"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">添加计划任务</span></span></h4><div class="notion-text notion-block-83f94869f6db4fb69a185c4b44899a44"><b>注意：请确定树莓派的时区是在中国，树莓派默认的时区不是中国。并确定时间是否正确</b></div><div class="notion-text notion-block-5e01ce6bebc345b9985902a6d95dcd1a">执行时间视需求而定，比如你想早上8点叫你起床，晚上9点播放电台就修改为</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-f2f77df010eb4bac9892d79147207107" data-id="f2f77df010eb4bac9892d79147207107"><span><div id="f2f77df010eb4bac9892d79147207107" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f2f77df010eb4bac9892d79147207107" title="END"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">END</span></span></h3><div class="notion-text notion-block-bb01815b16a84ad0a7c04fbd967b59f5">好了，等着第二天音响里轻轻响起的音乐开始美好的一天吧，有什么问题可以在下面留言。</div><div class="notion-text notion-block-54478fe266d944b2a57a773313ec99b1">不喜欢FM？这里有播放网易云音乐日推歌曲的文章：《<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.hscbook.com/article/raspberrypi-cloudmusic/">树莓派音乐闹钟，定时播放网易云音乐每日推荐歌单歌曲及插播语音天气预报</a>》</div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mikrotik RouterOS 路由器 CloudFlare DDNS 动态解析脚本(IPv4/IPv6)]]></title>
            <link>https://tangly1024.com/article/routeros-ddns-cloudflare</link>
            <guid>https://tangly1024.com/article/routeros-ddns-cloudflare</guid>
            <pubDate>Fri, 13 Mar 2020 00:00:00 GMT</pubDate>
            <description><![CDATA[在 RouterOS 添加一个脚本执行后将公网IPv4/IPv6解析到指定域名，该脚本改自 github 的 viritt/cloudflare_update.script 相比原版本增加IPv6解析以及双栈的支持]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-a59fd5dcd7da4751beefbc6a6e3a37f7"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-e4e611d339c9446486dfad4567492d27"><div>在 RouterOS 添加一个脚本执行后将公网IPv4/IPv6解析到指定域名，该脚本改自 github 的 viritt/cloudflare_update.script 相比原版本增加IPv6解析以及双栈的支持。</div></blockquote><div class="notion-text notion-block-2bb284c2243e46e7a118c66feb0835a9">&lt;ins/&gt;</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-87b086f6dafa4b548b31e451440ae9cc" data-id="87b086f6dafa4b548b31e451440ae9cc"><span><div id="87b086f6dafa4b548b31e451440ae9cc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#87b086f6dafa4b548b31e451440ae9cc" title="前提条件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">前提条件</span></span></h3><div class="notion-text notion-block-47b4f83d57144150b568b988b19bee80"><b>注意：脚本是基于RouterOS v6.46.4 编写的，大于小于此版本都可能导致一些命令问题</b></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-0af9c0d0c17840eeb6756a93617dc2e9" data-id="0af9c0d0c17840eeb6756a93617dc2e9"><span><div id="0af9c0d0c17840eeb6756a93617dc2e9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#0af9c0d0c17840eeb6756a93617dc2e9" title="确认正确的公网地址"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">确认正确的公网地址</span></span></h4><div class="notion-text notion-block-89dca18a43384f07b27c1eb15757ef2f"><b>IPv4验证方法：</b></div><div class="notion-text notion-block-b44b7bc4b3934e69ac23894398a1325b">脚本提取 (WinBox --&gt; IP --&gt; Address List) 内指定接口的IP地址进行解析</div><div class="notion-text notion-block-e8e4d4daa9614e36a65fdf98a4d8c0ce">ROS终端运行：<code class="notion-inline-code">/ip address get [/ip address find interface=接口名称] address</code></div><div class="notion-text notion-block-5d930777bcd946f18c4aff482b6963c1"><b>IPv6验证方法：</b></div><div class="notion-text notion-block-8aef03ffdedd486689ae78285cf983b0">脚本提取 DHCPv6 Client 获取的 Prefix 并加上指定的IPv6后缀进行解析</div><div class="notion-text notion-block-c103a0e585744e26be3c637f796d9c2a">ROS终端运行：<code class="notion-inline-code">/ipv6 dhcp-client get [find interface=接口名称] status</code></div><div class="notion-text notion-block-6fcfb3dd08de4117aee79688c8041d44">查看读出的数据是否为公网地址，</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-9c7a13a1fdce441abc2013d4de644b76" data-id="9c7a13a1fdce441abc2013d4de644b76"><span><div id="9c7a13a1fdce441abc2013d4de644b76" class="notion-header-anchor"></div><a class="notion-hash-link" href="#9c7a13a1fdce441abc2013d4de644b76" title="提前新建子域名"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">提前新建子域名</span></span></h4><div class="notion-text notion-block-2953de6b6d2b4857aa79b65b9106d1b3">在 CloudFlare 新建需要解析的子域名，若需要解析IPv6
和双栈还需要建立IPv4同名子域名和单独子域名，单独子域名用于IPv6是否更新的判断</div><ol start="1" class="notion-list notion-list-numbered notion-block-e9b1c900b6ae49a6b43a4ea285cc53d4" style="list-style-type:decimal"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://ipv4.hscbook.com/">ipv4.hscbook.com</a>（A记录）</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-eff3deaa1d5543398594882fe58533b3" style="list-style-type:decimal"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://ipv4.hscbook.com/">ipv4.hscbook.com</a>（AAAA记录）</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-142b35db825e4fd1b703c85a51bf104e" style="list-style-type:decimal"><li><a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://ipv6.hscbook.com/">ipv6.hscbook.com</a>（AAAA记录）</li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-260c9cf6bab340d19d846b4a304332ce" data-id="260c9cf6bab340d19d846b4a304332ce"><span><div id="260c9cf6bab340d19d846b4a304332ce" class="notion-header-anchor"></div><a class="notion-hash-link" href="#260c9cf6bab340d19d846b4a304332ce" title="建立脚本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">建立脚本</span></span></h3><div class="notion-text notion-block-e17d95ca0aaf49e3a4cff8ba97490a44">使用 WinBox 客户端连接至 RouterOS ；依次 System --&gt; Scripts 进入脚本列表，新建一个名为<code class="notion-inline-code">DDNS_CloudFlare</code> 脚本，将下面内容复制粘贴。</div><div class="notion-text notion-block-c240e9ed581e49e6a71578fc58d10c66">&lt;ins/&gt;</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-adf05b278bed4c31833da3a188ea6d46" data-id="adf05b278bed4c31833da3a188ea6d46"><span><div id="adf05b278bed4c31833da3a188ea6d46" class="notion-header-anchor"></div><a class="notion-hash-link" href="#adf05b278bed4c31833da3a188ea6d46" title="配置脚本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">配置脚本</span></span></h3><div class="notion-text notion-block-0a9333a68e3447c7bd885f905cfabe40">在 CloudFlare 域名主页的最下面 API 处</div><ol start="1" class="notion-list notion-list-numbered notion-block-e5829898e7044c6a8dfc0a90b6e66502" style="list-style-type:decimal"><li>将 Zone ID 填入脚本的 CFzoneid 变量</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-9e1f1e00278142a4b7eb0fa687e7e760" style="list-style-type:decimal"><li>点击 Get your API token 获取 API token 填入脚本的 CFtkn 变量</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-a041695719084154b00224748c873c59" style="list-style-type:decimal"><li>将 CloudFlare 的邮箱账号填入 CFemail 变量</li></ol><div class="notion-text notion-block-2d81a0c1a85d4be2b3b110736f93c3f3">根据三项信息套入 <code class="notion-inline-code">url -X GET \\&quot;&lt;https://api.cloudflare.com/client/v4/zones/$CFzoneid/dns_records\\&gt;&quot; -H \\&quot;X-Auth-Email: $CFemail\\&quot; -H \\&quot;X-Auth-Key: $CFtkn\\&quot; -H \\&quot;Content-Type: application/json\\&quot; | python -mjson.tool&quot;</code> 并在 linux 终端中运行可取得子域名的 CFid 并填入 CFdomainid 变量</div><div class="notion-text notion-block-e710bd26c1c04358bbb619dd5675b4bd"><b>其他变量根据注释以实际情况自行修改后点击 Run Script 运行脚本测试，查看系统日志无报错即可</b></div><div class="notion-text notion-block-b8df315290f64c38af7f54adce9ba209">&lt;ins/&gt;</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-eb98436241fe41f2816222d9f792e722" data-id="eb98436241fe41f2816222d9f792e722"><span><div id="eb98436241fe41f2816222d9f792e722" class="notion-header-anchor"></div><a class="notion-hash-link" href="#eb98436241fe41f2816222d9f792e722" title="创建任务计划"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">创建任务计划</span></span></h3><div class="notion-text notion-block-73c8b769598a435891b38a4ec21c033c">修改好脚本后使用 WinBox 客户端连接至 RouterOS ；依次 System --&gt; Scheduler进入任务计划列表新建一个任务计划间隔时间建议为 TTL 变量的两倍，内容为 <code class="notion-inline-code">/system script run &quot;DDNS_CloudFlare&quot;;</code></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-aedc887f8dd346eba022c76a12081b0f" data-id="aedc887f8dd346eba022c76a12081b0f"><span><div id="aedc887f8dd346eba022c76a12081b0f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#aedc887f8dd346eba022c76a12081b0f" title="END"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">END</span></span></h3><div class="notion-text notion-block-d712be5681354d39a63d178035822c80">参考文档：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://wiki.mikrotik.com/wiki/Main_Page">MikroTik Wiki</a></div><div class="notion-text notion-block-48cccf596fb74825b471a5ed0cfa7001">原脚本：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://gist.github.com/viritt/605173d0b9d8cce433be34539db9923f#file-cloudflare_update-script-L39">Automatic script for Mikrotik RouterOS updating record on CloudFlare.</a></div><div class="notion-text notion-block-226ec2746f964c0a9c870138587ccbd4">获取 CFid 可使用 API 调试工具，例：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://postwoman.cn/index.do#/article/detail?projectId=help&amp;moduleId=155032424248009000006&amp;type=ARTICLE&amp;id=155037947655301000051">Postwoman(ApiDebug)</a></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[一劳永逸，搭建ISSO开源评论系统全攻略教程]]></title>
            <link>https://tangly1024.com/article/isso-comment</link>
            <guid>https://tangly1024.com/article/isso-comment</guid>
            <pubDate>Mon, 05 Jun 2017 00:00:00 GMT</pubDate>
            <description><![CDATA[自己的评论系统才是最好的评论系统，前段时间多说关闭了评论系统切换到网易云跟帖毕竟是Beta项目反垃圾系统太严格了，动不动就审核失败而且自己还看不到被系统删除的留言，而且目前在云跟帖的群里的管理员说目前该项目正在暂停状态意思云跟帖也随时会关闭，果断自搭建了个留言系统，综合实验了各个开源系统最终ISSO的系统最稳定，唯一的遗憾就是没有后台系统]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-52f2fb2e7c1248918e7bfa64bc2c74d5"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-d1a8e0e9fbcd4d3fa0cb9ec4e02ea653"><div>自己的评论系统才是最好的评论系统，前段时间多说关闭了评论系统切换到网易云跟帖毕竟是Beta项目反垃圾系统太严格了，动不动就审核失败而且自己还看不到被系统删除的留言，而且目前在云跟帖的群里的管理员说目前该项目正在暂停状态意思云跟帖也随时会关闭，果断自搭建了个留言系统，综合实验了各个开源系统最终ISSO的系统最稳定，唯一的遗憾就是没有后台系统</div></blockquote><div class="notion-text notion-block-a9d49f853ca249e19f21320090e1c376">&lt;ins/&gt;</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-de29da3032864c9c8f4d9d01e70cd08b" data-id="de29da3032864c9c8f4d9d01e70cd08b"><span><div id="de29da3032864c9c8f4d9d01e70cd08b" class="notion-header-anchor"></div><a class="notion-hash-link" href="#de29da3032864c9c8f4d9d01e70cd08b" title="准备环境"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">准备环境</span></span></h3><ol start="1" class="notion-list notion-list-numbered notion-block-f0b31c4068814749a87a518f6802b968" style="list-style-type:decimal"><li>支持Python的环境</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-46d1b817a38e4cba8333a3b51d628942" style="list-style-type:decimal"><li>支持STMP的邮件服务器</li></ol><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-49ebce314ddc412bac9b95046ba27f65" data-id="49ebce314ddc412bac9b95046ba27f65"><span><div id="49ebce314ddc412bac9b95046ba27f65" class="notion-header-anchor"></div><a class="notion-hash-link" href="#49ebce314ddc412bac9b95046ba27f65" title="环境依赖"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">环境依赖</span></span></h3><div class="notion-text notion-block-d61f9e96b660452991d81da9792fe562">摘抄官方（需要翻墙）<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://posativ.org/isso/docs/install/">https://posativ.org/isso/docs/install/</a></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-70ca401c91c74885835f6289a4e28f5a" data-id="70ca401c91c74885835f6289a4e28f5a"><span><div id="70ca401c91c74885835f6289a4e28f5a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#70ca401c91c74885835f6289a4e28f5a" title="安装ISSO (PIP包)"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装ISSO (PIP包)</span></span></h3><div class="notion-text notion-block-b8661eda9ee94b28a8eb56f0173beaa3">先安装 Python 的 PIP包管理工具
<a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://www.pip-installer.org/en/latest/">http://www.pip-installer.org/en/latest/</a></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-42712855832348f2b7d88ff4cba8f9d7" data-id="42712855832348f2b7d88ff4cba8f9d7"><span><div id="42712855832348f2b7d88ff4cba8f9d7" class="notion-header-anchor"></div><a class="notion-hash-link" href="#42712855832348f2b7d88ff4cba8f9d7" title="创建配置文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">创建配置文件</span></span></h3><div class="notion-text notion-block-b75f38e3ca1d4174be7cf45119e72530">安装目录下有默认的配置文件 <code class="notion-inline-code">defaults.ini</code> 把它拷贝到任意目录。直接修改也是可以的。
参数详解 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://posativ.org/isso/docs/configuration/server/">https://posativ.org/isso/docs/configuration/server/</a>
创建服务端配置文件 <code class="notion-inline-code">nano /home/isso.conf</code></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-8e8d0007394e449bab003aa1f850a3bb" data-id="8e8d0007394e449bab003aa1f850a3bb"><span><div id="8e8d0007394e449bab003aa1f850a3bb" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8e8d0007394e449bab003aa1f850a3bb" title="在网站引用评论框"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">在网站引用评论框</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-2dedf6b73e05490484f7494bfd0b2ee5" data-id="2dedf6b73e05490484f7494bfd0b2ee5"><span><div id="2dedf6b73e05490484f7494bfd0b2ee5" class="notion-header-anchor"></div><a class="notion-hash-link" href="#2dedf6b73e05490484f7494bfd0b2ee5" title="引用ISSO-JS文件"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">引用ISSO-JS文件</span></span></h4><div class="notion-text notion-block-ebe03671c22946c9b63215eb22ddc99b"><b>在页尾 </b><code class="notion-inline-code"><b>footer</b></code><b> 添加处引用JS文件和客户端参数设置</b></div><div class="notion-text notion-block-beadf333a1d048f7a83050d09e58bc97">参数详解 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://posativ.org/isso/docs/configuration/client/">https://posativ.org/isso/docs/configuration/client/</a>
|-- 是否使用自带的CSS样式表
|--&gt; <code class="notion-inline-code">data-isso-css=&quot;true&quot;</code>
|-- 默认语言
|--&gt; <code class="notion-inline-code">data-isso-lang=&quot;ru&quot;</code>
|-- 是否允许回复自己（与服务端同步）
|--&gt; <code class="notion-inline-code">data-isso-reply-to-self=&quot;false&quot;</code>
|-- 是否必须输入名称
|--&gt; <code class="notion-inline-code">data-isso-require-author=&quot;false&quot;</code>
|-- 是否必须输入邮箱
|--&gt; <code class="notion-inline-code">data-isso-require-email=&quot;false&quot;</code>
|-- 一页内最多显示多少评论
|--&gt; <code class="notion-inline-code">data-isso-max-comments-top=&quot;10&quot;</code>
|-- 回复嵌套最大数
|--&gt; <code class="notion-inline-code">data-isso-max-comments-nested=&quot;5&quot;</code>
|-- 显示“显示评论”的阈值
|--&gt; <code class="notion-inline-code">data-isso-reveal-on-click=&quot;5&quot;</code>
|-- 是否使用像素头像
|--&gt; <code class="notion-inline-code">data-isso-avatar=&quot;true&quot;</code>
|-- 头像的背景颜色
|--&gt; <code class="notion-inline-code">data-isso-avatar-bg=&quot;#f0f0f0&quot;</code>
|-- 头像的颜色库（最多8个）
|--&gt; <code class="notion-inline-code">data-isso-avatar-fg=&quot;#9abf88 #5698c4 #e279a3 #9163b6 ...&quot;</code>
|-- 开启评论的支持和反对
|--&gt; <code class="notion-inline-code">data-isso-vote=&quot;true&quot;</code>
|-- 支持和反对的显示算法
|--&gt; <code class="notion-inline-code">data-vote-levels=&quot;&quot;</code></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-d7050899f18e4bdea64139ad15bda569" data-id="d7050899f18e4bdea64139ad15bda569"><span><div id="d7050899f18e4bdea64139ad15bda569" class="notion-header-anchor"></div><a class="notion-hash-link" href="#d7050899f18e4bdea64139ad15bda569" title="插入评论框与评论数"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">插入评论框与评论数</span></span></h4><div class="notion-text notion-block-1d6d92b214d94edeaa1f037541512851">使用下面两个标签的前提是必须**<a target="_blank" rel="noopener noreferrer" class="notion-link" href="notion://www.notion.so/rbook/2882d6f320be467aa2960b46ab0e919d?v=736d29094ea441e3b2e41cb81009ce83&amp;p=52f2fb2e7c1248918e7bfa64bc2c74d5#%E5%BC%95%E7%94%A8ISSO-JS%E6%96%87%E4%BB%B6">引用JS文件</a>**
在文章页的评论框处插入ISSO评论框</div><div class="notion-text notion-block-b67c78fdb09147b19ceabbb62070d004">在列表页和其他的任意位置插入评论记数</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-b6b8c0c3d8cd4d72ae4c6422133dd72d" data-id="b6b8c0c3d8cd4d72ae4c6422133dd72d"><span><div id="b6b8c0c3d8cd4d72ae4c6422133dd72d" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b6b8c0c3d8cd4d72ae4c6422133dd72d" title="启动ISSO"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">启动ISSO</span></span></h3><div class="notion-text notion-block-d8d497ca94ba49e18ef99168ee25757e">输入：<code class="notion-inline-code">isso -c /home/isso.conf run</code></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-b93c5782c6aa4eceb9ab05af8459bf70" data-id="b93c5782c6aa4eceb9ab05af8459bf70"><span><div id="b93c5782c6aa4eceb9ab05af8459bf70" class="notion-header-anchor"></div><a class="notion-hash-link" href="#b93c5782c6aa4eceb9ab05af8459bf70" title="自启动ISSO脚本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">自启动ISSO脚本</span></span></h3><div class="notion-text notion-block-171d0b50fe134f0f969dd0382b2d4d9c">摘抄官方文档 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://posativ.org/isso/docs/install/">https://posativ.org/isso/docs/install/</a></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-29a1f70740ef4d39be223e1147829666" data-id="29a1f70740ef4d39be223e1147829666"><span><div id="29a1f70740ef4d39be223e1147829666" class="notion-header-anchor"></div><a class="notion-hash-link" href="#29a1f70740ef4d39be223e1147829666" title="头像使用Gravatar"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">头像使用Gravatar</span></span></h3><div class="notion-text notion-block-7ddd40358ccf497eb0c1879fdfc2cce6"><s>由于ISSO的作者担忧</s><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://meta.stackexchange.com/questions/44717/is-gravatar-a-privacy-risk"><s>Gravatar的隐私泄露</s></a><s>反对Gravatar功能</s>，但是github上有一个Pull requests可以自行编译而支持Gravatar的头像显示
源Pull requests：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/posativ/isso/pull/317">https://github.com/posativ/isso/pull/317</a>
我的分支链接：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/Hscpro/isso">https://github.com/Hscpro/isso</a>
不会用github就直接克隆我的GIT进行编译吧，编译教程**<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://posativ.org/isso/docs/install/">点这里</a>** （<b>官方已在 </b><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/posativ/isso/releases"><b>0.11.0</b></a><b> 增加了Gravatar头像、邮件回复、管理面板等功能</b>）
请注意官方教程上的环境依赖！编译安装与直接安装环境要求不一样</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-57c5b9f057bb4e15adb47e75be2ed09e" data-id="57c5b9f057bb4e15adb47e75be2ed09e"><span><div id="57c5b9f057bb4e15adb47e75be2ed09e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#57c5b9f057bb4e15adb47e75be2ed09e" title="邮件回复通知"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">邮件回复通知</span></span></h3><div class="notion-text notion-block-b2e1cb2b86384371ac1157b354c57935">github上有一个Pull requests是实现邮件回复通知的提交
<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/posativ/isso/pull/50">https://github.com/posativ/isso/pull/50</a></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-3fe61893bc1746a6849d2a28677dacbd" data-id="3fe61893bc1746a6849d2a28677dacbd"><span><div id="3fe61893bc1746a6849d2a28677dacbd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#3fe61893bc1746a6849d2a28677dacbd" title="END"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">END</span></span></h3><div class="notion-text notion-block-a3c700981f24497293e15abdf3cd0a3f"><b>文章最后修订日期：2019-1-13 12:01:02</b>
启用了ISSO评论，并写了个备份脚本定期自动备份评论数据到云盘，从此腰也不疼，再也不用担心他方评论系统哪天人家心情不好来个关闭，搬评论数据甚至痛失数据的灾难了。
名称和邮箱必须填写（给你自己一个身份吧亲），我也开启了邮件地址加密，你填写的邮箱并不会被垃圾蜘蛛扫描</div><div class="notion-blank notion-block-da4e02e9ec3a4c4ba5a2ba463bd7a049"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[一个合格的服务器自动备份案例，闭环备份机制出错邮件报警]]></title>
            <link>https://tangly1024.com/article/linux-backups</link>
            <guid>https://tangly1024.com/article/linux-backups</guid>
            <pubDate>Sat, 23 Sep 2017 00:00:00 GMT</pubDate>
            <description><![CDATA[数据无价，服务器备份机制是服务器维护的重中之重！利用Dropbox的上传脚本+Monit监控实现服务器每周循环生成备份并上传到 Dropbox 网盘，通过 Shell 脚本实现出现备份失败及时通过邮件通知、自动清理旧的备份数据、禁止在黄金时段执行备份、禁止重复覆盖备份，确保服务器的宝贵数据万无一失！]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-654217c9d6b94d4796c9ec36d331dbdf"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-01dc718f834d4f45a744d7780332e321"><div>数据无价，服务器备份机制是服务器维护的重中之重！利用Dropbox的上传脚本+Monit监控实现服务器每周循环生成备份并上传到 Dropbox 网盘，通过 Shell 脚本实现出现备份失败及时通过邮件通知、自动清理旧的备份数据、禁止在黄金时段执行备份、禁止重复覆盖备份，确保服务器的宝贵数据万无一失！</div></blockquote><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-6fef21368f464e789fb1f2ee714534d9" data-id="6fef21368f464e789fb1f2ee714534d9"><span><div id="6fef21368f464e789fb1f2ee714534d9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#6fef21368f464e789fb1f2ee714534d9" title="环境安装"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">环境安装</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-ab3fb8da4f984588b8f3022b89ac5b0f" data-id="ab3fb8da4f984588b8f3022b89ac5b0f"><span><div id="ab3fb8da4f984588b8f3022b89ac5b0f" class="notion-header-anchor"></div><a class="notion-hash-link" href="#ab3fb8da4f984588b8f3022b89ac5b0f" title="Monit 监控服务"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Monit 监控服务</span></span></h4><div class="notion-text notion-block-b5bed8e151ec49b88376c059f7e38573">安装没有什么技术难度，本文不再啰嗦，有包管理用包管理安装没包管理用<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/arnaudsj/monit">源码</a>编译安装，遇到困难自行Google。</div><div class="notion-text notion-block-5943e8ad172f4506bc05966972852d41">RedHat / CentOS / Fedora</div><div class="notion-text notion-block-9635effd39d84b17bddd1fae0ffc28bb">Ubuntu / Debian / Linux Mint</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-a92717366d2346fc88a5f193f9806540" data-id="a92717366d2346fc88a5f193f9806540"><span><div id="a92717366d2346fc88a5f193f9806540" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a92717366d2346fc88a5f193f9806540" title="Dropbox 上传脚本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Dropbox 上传脚本</span></span></h4><div class="notion-text notion-block-db2001df41324aa1941b4677732b19be">直接使用 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/andreafabrizi/Dropbox-Uploader">Andreafabrizi</a> 写好的现成脚本 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/andreafabrizi/Dropbox-Uploader">Dropbox-Uploader</a> 稍作配置即可使用，配置教程下方提及。</div><div class="notion-text notion-block-b759ef94811d40ca8c3dba2ea00b0f32"><b>下载 Dropbox 上传脚本</b></div><div class="notion-text notion-block-b5b58095b684417fb36a978871f9ba85"><b>配置 Dropbox 上传脚本</b></div><div class="notion-text notion-block-c58a76ea3e3b4caf8946d432d8cfea24">访问 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.dropbox.com/developers/apps">https://www.dropbox.com/developers/apps</a></div><div class="notion-text notion-block-be1a6e2d9e004981b825625e05f20db7">创建 APP 程序 （点击Create app）</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-a1d1f2f56e034987ba43776e4cc75462"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fc0f6daf9-fb94-4951-84d9-8e5578e49376%2F20170922185018.jpg?table=block&amp;id=a1d1f2f5-6e03-4987-ba43-776e4cc75462&amp;t=a1d1f2f5-6e03-4987-ba43-776e4cc75462&amp;width=823&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-dd5a38fd430d41ec86478954f35378a1">创建 API 密钥</div><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-8cfa1484fdd949c98e4bb46b6b045bf2"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F46c14c06-d1f8-499f-b48a-c9d87a07965b%2F20170922190421.jpg?table=block&amp;id=8cfa1484-fdd9-49c9-8e4b-b46b6b045bf2&amp;t=8cfa1484-fdd9-49c9-8e4b-b46b6b045bf2&amp;width=831&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-561362d5e4f449b2bcb6e499afb63bbb">运行 <code class="notion-inline-code">dropbox_uploader.sh</code> 按提示输入 Dropbox API 密钥</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-30aa50b1bbcb4c848d87e2394dcb4d91" data-id="30aa50b1bbcb4c848d87e2394dcb4d91"><span><div id="30aa50b1bbcb4c848d87e2394dcb4d91" class="notion-header-anchor"></div><a class="notion-hash-link" href="#30aa50b1bbcb4c848d87e2394dcb4d91" title="构建备份脚本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">构建备份脚本</span></span></h3><div class="notion-text notion-block-897faff7e41641a8bab52caf9c8b891c">本脚本是基于 Monit 的监控原理来写的，所以最好配合 Monit 来使用(邮件报警功能是由 Monit 实现的)。由于我的服务器没有什么要用得上Mysql数据库的程序所以没写这方面的备份脚本，可直接备份Mysql的数据文件夹是一样的效果。</div><div class="notion-text notion-block-1f6a0ad6c7cd426a9cffaec4e216a44c"><b>注意事项</b></div><ol start="1" class="notion-list notion-list-numbered notion-block-cec7e542c9d04bdd926f67914ae8ad4f" style="list-style-type:decimal"><li>临时文件夹：&#x27;BACK_DATA&#x27; 变量的路径<b>不能</b>在要<b>备份的文件夹</b>内，最好就是设置在系统的 &#x27;tmp&#x27;临时文件夹内</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-6becc7ecd9f2409fa622451f0f43cd23" style="list-style-type:decimal"><li>备份文件夹：需要多少备份多少个目录就添加多少个数组，例：备份两个目录 &#x27; folder[0]=&quot;/...&quot; folder[1]=&quot;/...&quot; &#x27; 备份三个目录 &#x27; folder[0]=&quot;/...&quot; folder[1]=&quot;/...&quot; folder[2]=&quot;/...&quot; &#x27; 以此类推</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-fce57dfc51ab4cbd935609606b19a87c" style="list-style-type:decimal"><li>Dropbox的目录： &#x27;DROPBOX_DIR &#x27;要设置在子目录，这样设置有个好处就是多个服务器的备份不冲突</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-68c3ef8897604b5f9b5571838dd61cfd" style="list-style-type:decimal"><li>成功备份脚本返回 （0 ） 备份失败脚本返回（1）</li></ol><div class="notion-text notion-block-6adaa600447c4b2081222abf32700644">&lt;ins/&gt;</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-8573c82f51494dc6b354cedcf3943925" data-id="8573c82f51494dc6b354cedcf3943925"><span><div id="8573c82f51494dc6b354cedcf3943925" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8573c82f51494dc6b354cedcf3943925" title="Monit 监控脚本"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Monit 监控脚本</span></span></h3><div class="notion-text notion-block-0698fcb313124c378fd7632d77c8bea1">Monit 的强大配置都写完的话就跑题了，这里只写邮件服务器的配置和与本文相关的配置。</div><div class="notion-text notion-block-e25daf4ca89342628e7e7e90a6cf436f"><b>邮件服务器配置</b></div><div class="notion-text notion-block-360072e43b1c4f4fad100fa5af99c3a5"><b>备份脚本监控</b></div><div class="notion-blank notion-block-ac7f4d1f11b045c2a093d94a56fe197c"> </div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[树莓派香橙派无线播放，实现DLNA与AirPlay协议无线音箱]]></title>
            <link>https://tangly1024.com/article/raspberrypi-audio</link>
            <guid>https://tangly1024.com/article/raspberrypi-audio</guid>
            <pubDate>Mon, 17 Apr 2017 00:00:00 GMT</pubDate>
            <description><![CDATA[改造树莓派、香橙派摇身一变无线WIFI音响在线播放，无需安装XBMC这个庞然大物也能实现DLNA和AirPlay双协议的WIFI音响，DLNA 实现于Gmrender-resurrect项目、AirPlay实现于Shairport项目]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-0c2e4bd2baa04195ba39b186f4be094e"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-62bdc3b979614006a42492a3fd022c7a"><div>改造树莓派、香橙派摇身一变无线WIFI音响在线播放，无需安装XBMC这个庞然大物也能实现DLNA和AirPlay双协议的WIFI音响，DLNA 实现于Gmrender-resurrect项目、AirPlay实现于Shairport项目</div></blockquote><div class="notion-blank notion-block-ea4e9b78bd4b43fa8f42a30aab9d4d98"> </div><div class="notion-text notion-block-2cedcb03db244311a3efda04b517636b">&lt;ins/&gt;</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-51e873e429c5449cba403613ad358e07" data-id="51e873e429c5449cba403613ad358e07"><span><div id="51e873e429c5449cba403613ad358e07" class="notion-header-anchor"></div><a class="notion-hash-link" href="#51e873e429c5449cba403613ad358e07" title="准备工作"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">准备工作</span></span></h3><div class="notion-text notion-block-c7fd51924e8643f7b34cde7f5f11bf6c">拿出你放在角落里积灰的树莓派，扫扫灰尘，必要的时候再抚摸安慰一下？！哈哈哈</div><ol start="1" class="notion-list notion-list-numbered notion-block-3741f4204dbd4c7bb25f17c1b3c19b40" style="list-style-type:decimal"><li>选购一个降噪的USB声卡，树莓派的声噪有点惨不忍睹</li></ol><ol start="2" class="notion-list notion-list-numbered notion-block-2c3207e3cdf34778947a69e02d3d2694" style="list-style-type:decimal"><li>选购一个干扰低的电源给树莓派供电</li></ol><ol start="3" class="notion-list notion-list-numbered notion-block-c54e0350785542b5806f2fab67b36c8b" style="list-style-type:decimal"><li>选购一个好点的音响并连接到树莓派</li></ol><ol start="4" class="notion-list notion-list-numbered notion-block-2c5f9297e47e4b5fba8e18682286c4d3" style="list-style-type:decimal"><li>让树莓派有线/无线连接你到家WIFI</li></ol><ol start="5" class="notion-list notion-list-numbered notion-block-b5f1388850c5494db535bcf9ffe6b2b0" style="list-style-type:decimal"><li>准备一个10速内存卡，并烧录官方系统</li></ol><div class="notion-text notion-block-820fc988f2e84fb9b6d956d3f14d62a8">DLNA 协议项目：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/hzeller/gmrender-resurrect">gmrender-resurrect</a>
AirPlay 协议项目：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/abrasive/shairport">shairport</a></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-a7bb62084c8f43edbc64440f2bb0f1ba" data-id="a7bb62084c8f43edbc64440f2bb0f1ba"><span><div id="a7bb62084c8f43edbc64440f2bb0f1ba" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a7bb62084c8f43edbc64440f2bb0f1ba" title="必要环境"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">必要环境</span></span></h3><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-88178a3ba9ce42ba95ee2850a6e647ca" data-id="88178a3ba9ce42ba95ee2850a6e647ca"><span><div id="88178a3ba9ce42ba95ee2850a6e647ca" class="notion-header-anchor"></div><a class="notion-hash-link" href="#88178a3ba9ce42ba95ee2850a6e647ca" title="DLNA 协议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">DLNA 协议</span></span></h3><div class="notion-text notion-block-cc8e952c2a2747dba7cf659801e64426">参考文档：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md">https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md</a></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-a968fec8379c463cb59dab647005fc02" data-id="a968fec8379c463cb59dab647005fc02"><span><div id="a968fec8379c463cb59dab647005fc02" class="notion-header-anchor"></div><a class="notion-hash-link" href="#a968fec8379c463cb59dab647005fc02" title="安装依赖"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装依赖</span></span></h4><div class="notion-text notion-block-04e66276755c4a55905b8c5b0fd5bf4f"><code class="notion-inline-code">gstreamer1.0-alsa</code>  可选为 <code class="notion-inline-code">gstreamer1.0-pulseaudio</code>  这个要根据自己的环境而定，参考官方帮助文档 <a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md">gmrender-resurrect</a> 如果你不知道这是什么就无视这一段话。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-5850a8b7eb014ff3985b08b4285decf2" data-id="5850a8b7eb014ff3985b08b4285decf2"><span><div id="5850a8b7eb014ff3985b08b4285decf2" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5850a8b7eb014ff3985b08b4285decf2" title="安装 Gmrender"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装 Gmrender</span></span></h4><div class="notion-text notion-block-8a6f1d2ae55c4c5ea01606f8842ead89">1、定位到home文件夹并克隆程序源码</div><div class="notion-text notion-block-a9f8d3ee00f94342bed1ff1f68338f00">2、转到刚刚克隆的gmrender-resurrect文件夹并安装</div><div class="notion-text notion-block-886d9de1b8b5426c8c44e2846498dd4a">3、输入下面的命令运行服务并用电脑或者安卓一类支持DLNA播放的设备播放一首歌试试吧</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-4c77baaacfb04e18ac5ea0e14dec1a20" data-id="4c77baaacfb04e18ac5ea0e14dec1a20"><span><div id="4c77baaacfb04e18ac5ea0e14dec1a20" class="notion-header-anchor"></div><a class="notion-hash-link" href="#4c77baaacfb04e18ac5ea0e14dec1a20" title="设置开机自启"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">设置开机自启</span></span></h4><div class="notion-text notion-block-da8c830bc1884fdf95631ccfdd5f345c">1、拷贝相关配置文件</div><div class="notion-text notion-block-054875c8b95c42dd9d0c0177fb5fdaf7">2、建立用户组</div><div class="notion-text notion-block-1fc704f2408548dfb071f952b266341f">3、修改配置文件 <code class="notion-inline-code">/etc/init.d/gmediarenderer</code></div><div class="notion-text notion-block-dc2d5fcc30ba41a28aca57212f8033ea">4、设置开机自启</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-32df125d4cef4df383d2bb14378874f8" data-id="32df125d4cef4df383d2bb14378874f8"><span><div id="32df125d4cef4df383d2bb14378874f8" class="notion-header-anchor"></div><a class="notion-hash-link" href="#32df125d4cef4df383d2bb14378874f8" title="AirPlay 协议"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">AirPlay 协议</span></span></h3><div class="notion-text notion-block-6390f9423a6e4312a0acad5c13b021bd">参考文档：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/abrasive/shairport/wiki">https://github.com/abrasive/shairport/wiki</a></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-c8c0a9c5cfa44d5cb4e4327427492bcd" data-id="c8c0a9c5cfa44d5cb4e4327427492bcd"><span><div id="c8c0a9c5cfa44d5cb4e4327427492bcd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c8c0a9c5cfa44d5cb4e4327427492bcd" title="安装依赖"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装依赖</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-5c44b2342ac94e2cad82ecac8f31affe" data-id="5c44b2342ac94e2cad82ecac8f31affe"><span><div id="5c44b2342ac94e2cad82ecac8f31affe" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5c44b2342ac94e2cad82ecac8f31affe" title="安装 AirPlay"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装 AirPlay</span></span></h4><div class="notion-text notion-block-a4a0c95c2cbf4adab2b513d88288c557">1、定位到 <code class="notion-inline-code">home</code> 文件夹克隆程序源码并安装</div><div class="notion-text notion-block-3e7aea15f6754f46a4ff6176eb995c72">2、启动服务用苹果家族设备测试一下能否正常播放</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-71a9ec35117446a8a390d8eb031ff447" data-id="71a9ec35117446a8a390d8eb031ff447"><span><div id="71a9ec35117446a8a390d8eb031ff447" class="notion-header-anchor"></div><a class="notion-hash-link" href="#71a9ec35117446a8a390d8eb031ff447" title="设置开机自启"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">设置开机自启</span></span></h4><div class="notion-text notion-block-a368f2267c6b4cecbf094213f664c7af">1、拷贝相关配置文件</div><div class="notion-text notion-block-18075507ba8247189a04914c36f6841b">2、建立用户组</div><div class="notion-text notion-block-655fae0381284fab84c50f4a6adfbddb">3、修改配置文件 <code class="notion-inline-code">/etc/init.d/shairport</code></div><div class="notion-text notion-block-1522d29a06c24dff9dec1c5004d8fcf9">4、设置开机自启</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-87a94d6d057743fca58d0502bbee27cc" data-id="87a94d6d057743fca58d0502bbee27cc"><span><div id="87a94d6d057743fca58d0502bbee27cc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#87a94d6d057743fca58d0502bbee27cc" title="最终效果"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">最终效果</span></span></h3><figure class="notion-asset-wrapper notion-asset-wrapper-image notion-block-b380ce6b4e174bb2975ac24a4fa17c18"><div style="position:relative;display:flex;justify-content:center;align-self:center;width:100%;max-width:100%;flex-direction:column;height:100%"><img style="object-fit:cover" src="https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2Fa5382a24-210d-4648-91e3-06e6827a1372%2F201704170556.jpg?table=block&amp;id=b380ce6b-4e17-4bb2-975a-c24a4fa17c18&amp;t=b380ce6b-4e17-4bb2-975a-c24a4fa17c18&amp;width=623&amp;cache=v2" alt="notion image" loading="lazy" decoding="async"/></div></figure><div class="notion-text notion-block-83e6c922d22343e093bfba8b79a1587f">&lt;ins/&gt;</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-5a555eb91f034e97bc06fe598900ac10" data-id="5a555eb91f034e97bc06fe598900ac10"><span><div id="5a555eb91f034e97bc06fe598900ac10" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5a555eb91f034e97bc06fe598900ac10" title="更多教程"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">更多教程</span></span></h3><div class="notion-text notion-block-7533fac666b544d985830fae2a4b22fc"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="http://raspberrypihq.com/how-to-turn-your-raspberry-pi-into-a-airplay-receiver-to-stream-music-from-your-iphone/">http://raspberrypihq.com/how-to-turn-your-raspberry-pi-into-a-airplay-receiver-to-stream-music-from-your-iphone/</a><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://blog.wanghw.cn/archives/raspberry-wifisoundtrack.html">https://blog.wanghw.cn/archives/raspberry-wifisoundtrack.html</a><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md">https://github.com/hzeller/gmrender-resurrect/blob/master/INSTALL.md</a><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/abrasive/shairport/wiki">https://github.com/abrasive/shairport/wiki</a></div></main></div>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[树莓派自搭建家庭云储存服务，海文SeaFile安装全攻略]]></title>
            <link>https://tangly1024.com/article/raspberrypi-seafile</link>
            <guid>https://tangly1024.com/article/raspberrypi-seafile</guid>
            <pubDate>Wed, 14 Jun 2017 00:00:00 GMT</pubDate>
            <description><![CDATA[作为街拍党的我会经常备份相册到云方便随时随地同步到宿舍和家里的电脑，而国内支持手机相册备份的云服务要么就限速限空间老铁实在是不能忍受了。召唤树莓派！是时候搭建个私人家庭网盘了，对比了两家较大名气的开源云服务SeaFile和OwnCloud，我选择了SeaFile，由于树莓派在内网，穿透的问题6月的时候搭建了个评论服务器刚好资源较空闲可以用来内网穿透到树莓派]]></description>
            <content:encoded><![CDATA[<div id="notion-article" class="mx-auto overflow-hidden "><main class="notion light-mode notion-page notion-block-165cc107509b4ec3abe531eced71730d"><div class="notion-viewport"></div><div class="notion-collection-page-properties"></div><blockquote class="notion-quote notion-block-9042e0c0eb30437ca2bfadad6298f104"><div>作为街拍党的我会经常备份相册到云方便随时随地同步到宿舍和家里的电脑，而国内支持手机相册备份的云服务要么就限速限空间老铁实在是不能忍受了。召唤树莓派！是时候搭建个私人家庭网盘了，对比了两家较大名气的开源云服务SeaFile和OwnCloud，我选择了SeaFile，由于树莓派在内网，穿透的问题6月的时候搭建了个评论服务器刚好资源较空闲可以用来内网穿透到树莓派。</div></blockquote><div class="notion-blank notion-block-c3afc85dcef64fe5b74bfed2c6263787"> </div><div class="notion-text notion-block-9d02e63f88db48499f36f679ee31926f">&lt;ins/&gt;</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-7c780a8c6f2b4795a228719365149865" data-id="7c780a8c6f2b4795a228719365149865"><span><div id="7c780a8c6f2b4795a228719365149865" class="notion-header-anchor"></div><a class="notion-hash-link" href="#7c780a8c6f2b4795a228719365149865" title="搭建Seafile"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">搭建Seafile</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-c95367eaf8584f849aa6371359615c41" data-id="c95367eaf8584f849aa6371359615c41"><span><div id="c95367eaf8584f849aa6371359615c41" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c95367eaf8584f849aa6371359615c41" title="依赖环境准备"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">依赖环境准备</span></span></h4><div class="notion-text notion-block-e10a76c2a9734e6a80261bb7302e47c4">在你准备搭建的时候建议先仔细阅读一下官方的英文文档（中文文档不全）：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://manual.seafile.com/develop/index.html">SeaFile Documents</a>
本文档针对有一定Linux的人员阅读，并不是傻瓜教程因为官方文档已经说得非常详细了，但是因为官方文档是通用教程有些地方可能不适用于树莓派，本文对搭建方法简单带过，着重讲不适用于树莓派的地方，和我搭建过程中的疑难杂症
<b>1. 安装依赖（摘抄官方文档）</b></div><div class="notion-text notion-block-ed7c849639824c938cceeebe022cb2af"><b>2. 建立主工作文件夹</b></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-577d42d258164e5a9b55a39b1bbd876a" data-id="577d42d258164e5a9b55a39b1bbd876a"><span><div id="577d42d258164e5a9b55a39b1bbd876a" class="notion-header-anchor"></div><a class="notion-hash-link" href="#577d42d258164e5a9b55a39b1bbd876a" title="下载树莓派版安装包"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">下载树莓派版安装包</span></span></h4><div class="notion-text notion-block-cdb7bde60dfe490e858f18519739fcf5"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://github.com/haiwen/seafile-rpi/releases">https://github.com/haiwen/seafile-rpi/releases</a></div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-8b0f9053a02a4bdc9f3b89babc565ad3" data-id="8b0f9053a02a4bdc9f3b89babc565ad3"><span><div id="8b0f9053a02a4bdc9f3b89babc565ad3" class="notion-header-anchor"></div><a class="notion-hash-link" href="#8b0f9053a02a4bdc9f3b89babc565ad3" title="安装Seafile"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装Seafile</span></span></h4><div class="notion-text notion-block-9d387586a31346e980705037df4687d0">程序会自行检测依赖环境是否安装若不报错会自动进入安装程序，接下来按照安装程序的提示分别输入 <em>网站名称</em>、  <em>服务地址</em> 、 <em>数据文件夹地址</em>  就可以了安装程序很完善不再另行解释。</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-e3dbab1915bc446c9c2cbb94f8658152" data-id="e3dbab1915bc446c9c2cbb94f8658152"><span><div id="e3dbab1915bc446c9c2cbb94f8658152" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e3dbab1915bc446c9c2cbb94f8658152" title="Seafile的配置"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Seafile的配置</span></span></h4><div class="notion-text notion-block-3429f2d7421b408aa3b16beadc8c65d1"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://manual.seafile.com/config/ccnet-conf.html">https://manual.seafile.com/config/ccnet-conf.html</a><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://manual.seafile.com/config/seahub_settings_py.html">https://manual.seafile.com/config/seahub_settings_py.html</a>
着重看<code class="notion-inline-code">conf</code>文件夹的 <code class="notion-inline-code">seafile.conf</code>和<code class="notion-inline-code">seahub_settings.py</code>配置文件<code class="notion-inline-code">ccnet.conf</code>文件中的配置数据已经逐步移动到<code class="notion-inline-code">seahub_settings.py</code>了,<code class="notion-inline-code">seahub_settings.pyc</code>是缓存文件</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-5c4ff67d015f4ee7a4dd109057718596" data-id="5c4ff67d015f4ee7a4dd109057718596"><span><div id="5c4ff67d015f4ee7a4dd109057718596" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5c4ff67d015f4ee7a4dd109057718596" title="默认的服务端口更改"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">默认的服务端口更改</span></span></h4><div class="notion-text notion-block-d40fcc3b823a47aaab051e81cdf9fd48">默认端口<code class="notion-inline-code">8000</code>是网页服务端口，<code class="notion-inline-code">8082</code>是文件服务端口
修改 <code class="notion-inline-code">seafile.conf</code> 文件中的两个<code class="notion-inline-code">port:</code>更改端口
如果修改了端口需要注意添加 <code class="notion-inline-code">SERVICE_URL=&quot;http/s://服务地址：端口&quot;</code> 和 <code class="notion-inline-code">FILE_SERVER_ROOT=&quot;http/s://服务地址：端口/seafhttp&quot;</code> 到  <code class="notion-inline-code">seahub_settings.py</code> 配置文件中，并且文件服务端口的修改要么就保持默认要么就要与网页服务端口同步一致（针对经过Nginx反代的Seafile，由自带的网页服务提供的网页不建议修改）</div><div class="notion-text notion-block-be128b120cd345748f4f8d24e793e31c">例如服务地址：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://www.hscbook.com/">https://www.hscbook.com</a> 网页端口：8111 文件服务端口：8111</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-c98832e9682d483ba0482d0dba2cc599" data-id="c98832e9682d483ba0482d0dba2cc599"><span><div id="c98832e9682d483ba0482d0dba2cc599" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c98832e9682d483ba0482d0dba2cc599" title="Seafile 自启动"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Seafile 自启动</span></span></h4><div class="notion-text notion-block-27744f7d846a42d9b791ac5b4b0b7d09"><a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://manual.seafile.com/deploy/start_seafile_at_system_bootup.html">https://manual.seafile.com/deploy/start_seafile_at_system_bootup.html</a>
在官方文档获取启动脚本并修改参数，上传到<code class="notion-inline-code">/etc/init.d/seafile-server</code>赋予执行权限
运行：<code class="notion-inline-code">chkconfig --add seafile-server</code></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-85db9effc30e4e5283e59299ddc8b5ff" data-id="85db9effc30e4e5283e59299ddc8b5ff"><span><div id="85db9effc30e4e5283e59299ddc8b5ff" class="notion-header-anchor"></div><a class="notion-hash-link" href="#85db9effc30e4e5283e59299ddc8b5ff" title="安装Memcached加速Seafile"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装Memcached加速Seafile</span></span></h3><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-5b5fc32d14154e90b3bdd0031e876447" data-id="5b5fc32d14154e90b3bdd0031e876447"><span><div id="5b5fc32d14154e90b3bdd0031e876447" class="notion-header-anchor"></div><a class="notion-hash-link" href="#5b5fc32d14154e90b3bdd0031e876447" title="依赖环境准备"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">依赖环境准备</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-43cc66bf247545edb718bc10f6a95af9" data-id="43cc66bf247545edb718bc10f6a95af9"><span><div id="43cc66bf247545edb718bc10f6a95af9" class="notion-header-anchor"></div><a class="notion-hash-link" href="#43cc66bf247545edb718bc10f6a95af9" title="编译Memcached"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">编译Memcached</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-371ede210183412c8625c33715846e88" data-id="371ede210183412c8625c33715846e88"><span><div id="371ede210183412c8625c33715846e88" class="notion-header-anchor"></div><a class="notion-hash-link" href="#371ede210183412c8625c33715846e88" title="编译libmemcached"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">编译libmemcached</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-c69896b868ff46e487636b4d0df6ca11" data-id="c69896b868ff46e487636b4d0df6ca11"><span><div id="c69896b868ff46e487636b4d0df6ca11" class="notion-header-anchor"></div><a class="notion-hash-link" href="#c69896b868ff46e487636b4d0df6ca11" title="安装Python环境的客户端"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装Python环境的客户端</span></span></h4><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-1a9ad0f3e5de4c4aa5ac0a0287587a76" data-id="1a9ad0f3e5de4c4aa5ac0a0287587a76"><span><div id="1a9ad0f3e5de4c4aa5ac0a0287587a76" class="notion-header-anchor"></div><a class="notion-hash-link" href="#1a9ad0f3e5de4c4aa5ac0a0287587a76" title="修改Seafile配置文件开启缓存"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">修改Seafile配置文件开启缓存</span></span></h4><div class="notion-text notion-block-fab01fe24ab5461298510e8a1dc85375">打开<code class="notion-inline-code">seahub_settings.py</code>添加</div><div class="notion-text notion-block-683df0e4a6954c99a81eeb200110903a">运行Memcached
<code class="notion-inline-code">sudo /usr/bin/memcached -d -m 64m -l 127.0.0.1 -p 11211 -u pi -d</code>
最后重启Seafile服务就可以了</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-89fd458b608943d5b74f0402d82ddddd" data-id="89fd458b608943d5b74f0402d82ddddd"><span><div id="89fd458b608943d5b74f0402d82ddddd" class="notion-header-anchor"></div><a class="notion-hash-link" href="#89fd458b608943d5b74f0402d82ddddd" title="自启动Memcached"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">自启动Memcached</span></span></h4><div class="notion-text notion-block-4919ee3ed824468db73e87cd8a0f6710">修改下面的参数，并上传到<code class="notion-inline-code">/etc/init.d/memcached</code>赋予执行权限
运行：<code class="notion-inline-code">chkconfig --add memcached</code></div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-e71ae48d14984b3ea640f1f043e82ecc" data-id="e71ae48d14984b3ea640f1f043e82ecc"><span><div id="e71ae48d14984b3ea640f1f043e82ecc" class="notion-header-anchor"></div><a class="notion-hash-link" href="#e71ae48d14984b3ea640f1f043e82ecc" title="Nginx 反代理Seafile并CDN加速"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">Nginx 反代理Seafile并CDN加速</span></span></h3><div class="notion-text notion-block-b1a9fb4e05074043af916b242ebfcec3">Seafile 的静态文件挺大的，每次都回源好心疼我的流量，上官方论坛、谷歌都没有找到有用的教程就只能自己研究了。我的环境有点特殊，因为树莓派是经过内网穿透到VPS进行外网访问的端口不是默认的80，443端口，这表示我不能用CDN加速了（大多数的CDN都是只能加速80，443流量的）有天逛谷歌无意看到一篇Cloudflare的文章：<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://support.cloudflare.com/hc/en-us/articles/200169156-Which-ports-will-Cloudflare-work-with-">https://support.cloudflare.com/hc/en-us/articles/200169156-Which-ports-will-Cloudflare-work-with-</a>发现Cloudflare可以反代理非80，443端口这大法简直贼溜。
HTTP专用端口：80，8080，8880，2052，2082，2086，2095
HTTPS专用端口：443，2053，2083，2087，2096，8443
专用端口的意思是比如你用2053端口，那么从 【 <b>用户</b> 到 <b>Cloudflare</b> 到 <b>源服务器</b> 】 必须全程HTTPS，任何一环使用HTTP都是不允许的。</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-f3867acf318e44618ce8990c04f46bed" data-id="f3867acf318e44618ce8990c04f46bed"><span><div id="f3867acf318e44618ce8990c04f46bed" class="notion-header-anchor"></div><a class="notion-hash-link" href="#f3867acf318e44618ce8990c04f46bed" title="安装Srafile后头像无法正常显示"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">安装Srafile后头像无法正常显示</span></span></h3><div class="notion-text notion-block-46d25258994c4820aa2020d57b70816a">可能是因为我的环境的问题，第一次安装Seafile后头像无法显示，上传头像显示<b>Page unavailable</b>删掉文件重新下载安装也没用，上官方<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://bbs.seafile.com/t/seafile/3549">发帖</a>提问无果，最后还是自己根据官方的文档上的目录结构检查目录发现avatars目录链接文件存在异常。
正常情况<code class="notion-inline-code">/seafile-server-latest/seahub/media/avatars</code> 目录是个链接文件指向 -&gt; <code class="notion-inline-code">/seahub-data/avatars</code>，并且<code class="notion-inline-code">/seahub-data/avatars</code>存放着默认头像
我分别用<code class="notion-inline-code">ln</code>命令查看了两个目录，发现<code class="notion-inline-code">/seahub-data/avatars</code> 也是个链接文件并指向 -&gt; <code class="notion-inline-code">/seafile-server-latest/seahub/media/avatars</code> 这是搞事情啊，两个互相指向？</div><h4 class="notion-h notion-h3 notion-h-indent-1 notion-block-de5cfa4ef1bb45ff9aa7887d2e77768e" data-id="de5cfa4ef1bb45ff9aa7887d2e77768e"><span><div id="de5cfa4ef1bb45ff9aa7887d2e77768e" class="notion-header-anchor"></div><a class="notion-hash-link" href="#de5cfa4ef1bb45ff9aa7887d2e77768e" title="处理方法"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">处理方法</span></span></h4><div class="notion-text notion-block-e9fbce6eba4d49e19fb17ad304ae6260">分别在SSH（FTP查看不了失效的链接文件）把两个avatars链接文件RM掉。再在下载的安装包重新提取avatars文件夹放到 <code class="notion-inline-code">./seahub-data</code> 并且在<code class="notion-inline-code">./seafile-server-latest/seahub/media/avatars</code> 创建链接文件并指向 <code class="notion-inline-code">./seahub-data/avatars</code> 清空缓存然后重启SeaFile</div><h3 class="notion-h notion-h2 notion-h-indent-0 notion-block-982c0ba770984116b6c16097fc6d6888" data-id="982c0ba770984116b6c16097fc6d6888"><span><div id="982c0ba770984116b6c16097fc6d6888" class="notion-header-anchor"></div><a class="notion-hash-link" href="#982c0ba770984116b6c16097fc6d6888" title="END"><svg viewBox="0 0 16 16" width="16" height="16"><path fill-rule="evenodd" d="M7.775 3.275a.75.75 0 001.06 1.06l1.25-1.25a2 2 0 112.83 2.83l-2.5 2.5a2 2 0 01-2.83 0 .75.75 0 00-1.06 1.06 3.5 3.5 0 004.95 0l2.5-2.5a3.5 3.5 0 00-4.95-4.95l-1.25 1.25zm-4.69 9.64a2 2 0 010-2.83l2.5-2.5a2 2 0 012.83 0 .75.75 0 001.06-1.06 3.5 3.5 0 00-4.95 0l-2.5 2.5a3.5 3.5 0 004.95 4.95l1.25-1.25a.75.75 0 00-1.06-1.06l-1.25 1.25a2 2 0 01-2.83 0z"></path></svg></a><span class="notion-h-title">END</span></span></h3><div class="notion-text notion-block-af332b9d239e48b5b1ab7da73b3dc4d3">为了搭建Seafile我用了一个礼拜，遇到很多的疑难杂症都是自己Google的。实在自己解决不了的可以上<a target="_blank" rel="noopener noreferrer" class="notion-link" href="https://bbs.seafile.com/">官方论坛</a>或者直接在下面<b>留言</b>也行，我能帮的我都尽量。
留言开通了留言审核请<b>正确填写邮箱</b>，填写的<b>邮箱不对外公开并且是经过加密</b>的，不用担心垃圾邮件服务器的扫描（我也很厌恶垃圾邮件）！</div></main></div>]]></content:encoded>
        </item>
    </channel>
</rss>