<!DOCTYPE html>
<html lang="zh-Hans">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="renderer" content="webkit">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=5">
    <title>一款开源，简单的轻量级RSS阅读器：selfoss安装教程 | 云图网</title>
    <meta name="keywords" content="apache,centos,CSS,Docker,Fedora,html,mysql,nginx,Ubuntu">
<meta name="description" content="说明：关于RSS订阅器，之前发过不少了，比如Feedbin、FreshRSS等，功能都挺强大的，这里就再介绍个轻量级的RSS订阅器selfoss，使用起来是非常简单的，界面颜值也还不错，支持很多种订阅和网站，比如Twitter、Github、Tumblr等。截图安装Github地址：https://github.com…">
<meta property="og:type" content="article">
<meta property="og:url" content="https://blog.ytso.com/tech/pnotes/246959.html">
<meta property="og:site_name" content="云图网">
<meta property="og:title" content="一款开源，简单的轻量级RSS阅读器：selfoss安装教程">
<meta property="og:image" content="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/04/19/20220420033850712.png">
<meta property="og:description" content="说明：关于RSS订阅器，之前发过不少了，比如Feedbin、FreshRSS等，功能都挺强大的，这里就再介绍个轻量级的RSS订阅器selfoss，使用起来是非常简单的，界面颜值也还不错，支持很多种订阅和网站，比如Twitter、Github、Tumblr等。截图安装Github地址：https://github.com…">
<link rel="canonical" href="https://blog.ytso.com/tech/pnotes/246959.html">
<meta name="applicable-device" content="pc,mobile">
<meta http-equiv="Cache-Control" content="no-transform">
<link rel="shortcut icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg">
<link rel='dns-prefetch' href='//cdnjs.cloudflare.com' />
<style id='wp-img-auto-sizes-contain-inline-css' type='text/css'>
img:is([sizes=auto i],[sizes^="auto," i]){contain-intrinsic-size:3000px 1500px}
/*# sourceURL=wp-img-auto-sizes-contain-inline-css */
</style>
<link rel='stylesheet' id='stylesheet-css' href='https://blog.ytso.com/wp-content/themes/justnews/css/style.css?ver=6.21.5' type='text/css' media='all' />
<link rel='stylesheet' id='material-icons-css' href='https://blog.ytso.com/wp-content/themes/justnews/themer/assets/css/material-icons.css?ver=6.21.5' type='text/css' media='all' />
<link rel='stylesheet' id='remixicon-css' href='https://cdnjs.cloudflare.com/ajax/libs/remixicon/4.2.0/remixicon.min.css?ver=6.9.4' type='text/css' media='all' />
<link rel='stylesheet' id='font-awesome-css' href='https://blog.ytso.com/wp-content/themes/justnews/themer/assets/css/font-awesome.css?ver=6.21.5' type='text/css' media='all' />
<style id='wp-block-library-inline-css' type='text/css'>
:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}.has-text-align-center{text-align:center}.has-text-align-left{text-align:left}.has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}}
/*wp_block_styles_on_demand_placeholder:69c7536ada0cc*/
/*# sourceURL=wp-block-library-inline-css */
</style>
<style id='classic-theme-styles-inline-css' type='text/css'>
/*! This file is auto-generated */
.wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none}
/*# sourceURL=/wp-includes/css/classic-themes.min.css */
</style>
<link rel='stylesheet' id='wpcom-member-css' href='https://blog.ytso.com/wp-content/plugins/wpcom-member/css/style.css?ver=1.7.19' type='text/css' media='all' />
<script type="text/javascript" src="https://blog.ytso.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1" id="jquery-core-js"></script>
<script type="text/javascript" src="https://blog.ytso.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1" id="jquery-migrate-js"></script>
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://blog.ytso.com/xmlrpc.php?rsd" />
<meta name='description' content='说明：关于RSS订阅器，之前发过不少了，比如Feedbin、FreshRSS等，功能都挺强大的，这里就再介绍个轻量级的RSS订阅器selfoss，使用起来是非常简单的，界面颜值也还不错，支持很多种订阅和网站，比如Twitter、Github…' />
<meta name='keywords' content='apache,centos,CSS,Docker,Fedora,html,mysql,nginx,Ubuntu' />
<style>:root{--theme-color: #08c; --theme-hover: #07c; --logo-height: 32px; --logo-height-mobile: 26px; --menu-item-gap: 28px; --member-login-bg: url('https://blog.ytso.com/loginwall.jpg'); --header-bg-color: #fff; --header-bg-image: none; --theme-border-radius-s: 3px; --theme-border-radius-m: 5px; --theme-border-radius-l: 8px; --theme-border-radius-xl: 12px; --thumb-ratio-default: 480 / 300; --thumb-ratio-post: 480 / 300; --post-video-ratio: 860 / 482;}</style>
<link rel="icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" sizes="32x32" />
<link rel="icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" sizes="192x192" />
<link rel="apple-touch-icon" href="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" />
<meta name="msapplication-TileImage" content="https://imgcdn.ytso.com/wp-content/uploads/2024/10/20241015181503433.jpg" />
    <!--[if lte IE 11]><script src="https://blog.ytso.com/wp-content/themes/justnews/js/update.js"></script><![endif]-->
</head>
<body class="wp-singular post-template-default single single-post postid-246959 single-format-standard wp-theme-justnews lang-cn el-boxed header-fixed">
<header class="header header-fluid">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target=".navbar-collapse" aria-label="menu">
                <span class="icon-bar icon-bar-1"></span>
                <span class="icon-bar icon-bar-2"></span>
                <span class="icon-bar icon-bar-3"></span>
            </button>
                        <div class="logo">
                <a href="https://blog.ytso.com/" rel="home">
                    <img src="https://imgcdn.ytso.com/wp-content/uploads/2021/12/20211207181156143.png" alt="云图网">
                </a>
            </div>
        </div>
        <div class="collapse navbar-collapse mobile-style-0">
            <nav class="primary-menu"><ul id="menu-justnews-footer-menu" class="nav navbar-nav wpcom-adv-menu"><li class="menu-item"><a href="https://blog.ytso.com/category/industrynews">业界资讯</a></li>
<li class="menu-item current-post-ancestor active menu-item-style menu-item-style-1 dropdown"><a target="_blank" href="https://blog.ytso.com/category/tech" class="dropdown-toggle">技术专区</a>
<ul class="dropdown-menu menu-item-wrap menu-item-col-5">
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/cloud">云计算</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/ai">人工智能</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/safety">信息安全</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/bigdata">大数据</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/dev">研发管理</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/webdev">大前端</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/opensource">开源</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/aiops">智能运维</a></li>
	<li class="menu-item current-post-ancestor current-post-parent active"><a href="https://blog.ytso.com/category/tech/pnotes">编程笔记</a></li>
	<li class="menu-item"><a href="https://blog.ytso.com/category/tech/wp">WordPress</a></li>
</ul>
</li>
<li class="menu-item"><a href="https://blog.ytso.com/category/enterprise-strategic-planning">企业战略规划</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/download">下载专区</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/it%e6%b1%9f%e6%b9%96%e5%8f%b2">江湖史</a></li>
<li class="menu-item"><a href="https://blog.ytso.com/category/notes">随笔记录</a></li>
</ul></nav>            <div class="navbar-action">
                <div class="navbar-search-icon j-navbar-search"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></div><form class="navbar-search" action="https://blog.ytso.com/" method="get" role="search"><div class="navbar-search-inner"><i class="wpcom-icon wi navbar-search-close"><svg aria-hidden="true"><use xlink:href="#wi-close"></use></svg></i><input type="text" name="s" class="navbar-search-input" autocomplete="off" maxlength="100" placeholder="输入关键词搜索..." value=""><button class="navbar-search-btn" type="submit" aria-label="搜索"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></button></div></form>                    <div id="j-user-wrap">
                        <a class="login" href="https://blog.ytso.com/login">登录</a>
                        <a class="login register" href="https://blog.ytso.com/register">注册</a>
                    </div>
                                            <a class="wpcom-btn btn-primary btn-xs publish" href="https://blog.ytso.com/contribute">
                            <i class="fa fa-edit"></i> 投稿                        </a>
                                </div>
        </div>
    </div><!-- /.container -->
</header>

<div id="wrap">    <div class="wrap container">
        <ol class="breadcrumb" vocab="https://schema.org/" typeof="BreadcrumbList"><li class="home" property="itemListElement" typeof="ListItem"><a href="https://blog.ytso.com" property="item" typeof="WebPage"><span property="name" class="hide">云图网</span>首页</a><meta property="position" content="1"></li><li property="itemListElement" typeof="ListItem"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-3"></use></svg></i><a href="https://blog.ytso.com/category/tech" property="item" typeof="WebPage"><span property="name">技术专区</span></a><meta property="position" content="2"></li><li property="itemListElement" typeof="ListItem"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-3"></use></svg></i><a href="https://blog.ytso.com/category/tech/pnotes" property="item" typeof="WebPage"><span property="name">编程笔记</span></a><meta property="position" content="3"></li></ol>        <main class="main">
                            <article id="post-246959" class="post-246959 post type-post status-publish format-standard hentry category-pnotes tag-apache tag-centos tag-css tag-docker tag-fedora tag-html tag-mysql tag-nginx tag-ubuntu entry">
                    <div class="entry-main">
                                                                        <div class="entry-head">
                            <h1 class="entry-title">一款开源，简单的轻量级RSS阅读器：selfoss安装教程</h1>
                            <div class="entry-info">
                                                                <time class="entry-date published" datetime="2022-04-22T09:27:34+08:00" pubdate>
                                    2022年4月22日 09:27                                </time>
                                <span class="dot">•</span>
                                <a href="https://blog.ytso.com/category/tech/pnotes" rel="category tag">编程笔记</a>                                                            </div>
                        </div>
                        
                                                <div class="entry-content text-indent text-justify">
                            <div id="toc">
<p class="toc-title"><strong>文章目录</strong><span class="toc-controller toc-controller-show">[隐藏]</span></p>
<ul>
<li class="toc-level2"><a href="#toc_1">截图</a></li>
<li class="toc-level2"><a href="#toc_2">安装</a></li>
<li class="toc-level2"><a href="#toc_3">手动安装</a></li>
<li class="toc-level2"><a href="#toc_4">Docker安装</a></li>
</ul>
</div>
<p><strong>说明：</strong>关于<code>RSS</code>订阅器，之前发过不少了，比如<a href="https://www.moerats.com/archives/758/" target="_blank" rel="noopener">Feedbin</a>、<a href="https://www.moerats.com/archives/607/" target="_blank" rel="noopener">FreshRSS</a>等，功能都挺强大的，这里就再介绍个轻量级的<code>RSS</code>订阅器<code>selfoss</code>，使用起来是非常简单的，界面颜值也还不错，支持很多种订阅和网站，比如<code>Twitter</code>、<code>Github</code>、<code>Tumblr</code>等。</p>
<h2 id="toc_1">截图</h2>
<p><noscript><img decoding="async" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/04/19/20220420033850712.png" alt="请输入图片描述" title="请输入图片描述"></noscript><img decoding="async" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/04/19/20220420033850712.png" alt="请输入图片描述" title="请输入图片描述"><br /><noscript><img decoding="async" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/04/19/20220420033855825.png" alt="请输入图片描述" title="请输入图片描述"></noscript><img decoding="async" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/04/19/20220420033855825.png" alt="请输入图片描述" title="请输入图片描述"><br /><noscript><img decoding="async" src="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/04/19/20220420033901305.png" alt="请输入图片描述" title="请输入图片描述"></noscript><img decoding="async" class="j-lazy" src="https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/04/19/20220420033901305.png" alt="请输入图片描述" title="请输入图片描述"></p>
<h2 id="toc_2">安装</h2>
<p><strong>Github地址：</strong><a href="https://github.com/SSilence/selfoss" target="_blank" rel="noopener">https://github.com/SSilence/selfoss</a></p>
<p><strong>环境要求：</strong><code>PHP 5.4+</code>，<code>MySQL 5.5+</code>、<code>PostgreSQL</code>或<code>Sqlite</code>，<code>Apache</code>、<code>Nginx</code>或<code>Lighttpd</code></p>
<p>这里就大概说<code>3</code>种安装方法，宝塔安装、手动安装和<code>Docker</code>安装，数据库均使用<code>Sqlite</code>，建议直接使用<code>Docker</code>安装。</p>
<p><strong>1、安装宝塔</strong></p>
<pre><code>#CentOS系统
wget -O install.sh http://download.bt.cn/install/install_6.0.sh &amp;&amp; sh install.sh
#Ubuntu系统
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh &amp;&amp; sudo bash install.sh
#Debian系统
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh &amp;&amp; bash install.sh
</code></pre>
<p>安装完成后，进入面板，点击左侧软件管理，然后安装<code>PHP 5.6+</code>、<code>Nginx</code>或<code>Apache</code>。</p>
<p><strong>2、安装程序</strong><br />再点击左侧网站，添加域名，然后在<code>SSH</code>客户端运行命令：</p>
<pre><code>#进入网站根目录，将路径修改成自己的再运行
cd /www/wwwroot/www.moerats.com
#下载selfoss
wget https://github.com/SSilence/selfoss/releases/download/2.18/selfoss-2.18.zip
#解压并重命名配置文件
unzip selfoss-2.18.zip &amp;&amp; rm -rf selfoss-2.18.zip
cp defaults.ini config.ini
#给予文件夹权限
chown -R www:www ./
chmod 775 data/cache data/favicons data/logs data/thumbnails data/sqlite public/
</code></pre>
<p><code>Nginx</code>还需要点击站点设置，设置伪静态，代码如下：</p>
<pre><code>location ~ ^/favicons/.*$ {
    try_files $uri /data/$uri;
}    
location ~ ^/thumbnails/.*$ {
    try_files $uri /data/$uri;
}    
location ~* ^/(data//logs|data//sqlite|config/.ini|/.ht) {
    deny all;
}    
location / {
    index index.php index.html index.htm;
    try_files $uri /public/$uri /index.php$is_args$args;
}</code></pre>
<p>然后点击配置文件，删除以下几行，代码为：</p>
<pre><code>location ~ .*/.(gif|jpg|jpeg|png|bmp|swf)$
{
    expires      30d;
    error_log off;
    access_log off;
}

location ~ .*/.(js|css)?$
{
    expires      12h;
    error_log off;
    access_log off; 
}
</code></pre>
<p>然后就可以打开站点了，最开始是没登录界面的，也就是每个人都可以直接使用，然后我们可以编辑<code>config.ini</code>配置文件来添加登录界面，修改以下参数：</p>
<pre><code>#分别为站点地址，登录用户名和哈希密码
base_url=https://www.moerats.com
username=moerats
password=kjl1289$swpaf4JPllpKJQp94h/LF1
</code></pre>
<p>密码可以访问<code>http://www.moerats.com/password</code>生成，将域名修改成自己的<code>selfoss</code>站点域名，更多的配置文件设置可以查看官方说明→<a href="https://selfoss.aditu.de/#configuration_params" target="_blank" rel="noopener">传送门</a>。</p>
<p><strong>3、设置RSS刷新</strong><br />点击宝塔左侧-计划任务，类型访问<code>URL</code>，地址填上<code>http://www.moerats.com/update</code>，将域名修改成自己的，时间的话，建议每<code>30</code>分钟。</p>
<h2 id="toc_3">手动安装</h2>
<p>这里只适用于<code>Debian8</code>、<code>9</code>系统，建议直接<code>Debian 9</code>。</p>
<p><strong>1、安装环境</strong></p>
<pre><code>#Debian 8系统
echo &quot;deb http://packages.dotdeb.org jessie all&quot; | tee --append /etc/apt/sources.list
echo &quot;deb-src http://packages.dotdeb.org jessie all&quot; | tee --append /etc/apt/sources.list
wget --no-check-certificate https://www.dotdeb.org/dotdeb.gpg
apt-key add dotdeb.gpg
apt update
apt install nginx cron unzip php7.0-cgi php7.0-fpm php7.0-curl php7.0-gd php7.0-mbstring php7.0-xml php7.0-sqlite sqlite -y

#Debian 9系统
apt update
apt install nginx unzip cron php7.0-pdo php7.0-fpm php7.0-tidy php7.0-gd php7.0-mbstring php7.0-xml php7.0-sqlite sqlite -y
</code></pre>
<p><strong>2、安装程序</strong></p>
<pre><code>#新建网站根目录
mkdir -p /www/wwwroot/selfoss
#进入网站根目录
cd /www/wwwroot/selfoss
#下载selfoss
wget https://github.com/SSilence/selfoss/releases/download/2.18/selfoss-2.18.zip
#解压并重命名配置文件
unzip selfoss-2.18.zip &amp;&amp; rm -rf selfoss-2.18.zip
cp defaults.ini config.ini
#给予文件夹权限
chown -R www-data:www-data ./
chmod 775 data/cache data/favicons data/logs data/thumbnails data/sqlite public/
</code></pre>
<p><strong>3、新建站点配置文件</strong></p>
<pre><code>#将域名修改为自己的，然后一起复制进SSH运行即可
cat &gt; /etc/nginx/conf.d/selfoss.conf &lt;&lt; &quot;EOF&quot;
server {
    listen 80;
    server_name www.moerats.com;
    root /www/wwwroot/selfoss;
    index index.html index.php;
    location ~* / (gif|jpg|png) {
        expires 30d;
    }
    location ~ ^/favicons/.*$ {
        try_files $uri /data/$uri;
    }
    location ~ ^/thumbnails/.*$ {
        try_files $uri /data/$uri;
    }
    location ~* ^/(data//logs|data//sqlite|config/.ini|/.ht) {
        deny all;
    }
    location / {
        index index.php index.html index.htm;
        try_files $uri /public/$uri /index.php$is_args$args;
    }        
    location ~ /.php$ {
        include snippets/fastcgi-php.conf;
        fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    }
}
EOF
</code></pre>
<p>再使用<code>systemctl restart nginx</code>命令重启<code>Nginx</code>生效。如果想给<code>RSS</code>站点加用户名密码登录的可参考上面的宝塔安装方法。</p>
<p><strong>4、设置RSS刷新</strong></p>
<pre><code>#设置为每30分钟执行一次，将域名修改为自己的
echo &quot;*/30 * * * * /usr/bin/curl -Ls 'http://www.moerats.com/update' &gt;/dev/null&quot; &gt; bt.cron
crontab bt.cron
rm -rf bt.cron
</code></pre>
<p>使用求最后<code>crontab -l</code>命令查看添加成功没。</p>
<h2 id="toc_4">Docker安装</h2>
<p><strong>1、安装Docker</strong></p>
<pre><code>#CentOS 6
rpm -iUvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum update -y
yum -y install docker-io
service docker start
chkconfig docker on

#CentOS 7、Debian、Ubuntu
curl -sSL https://get.docker.com/ | sh
systemctl start docker
systemctl enable docker
</code></pre>
<p><strong>2、拉取镜像</strong></p>
<pre><code>docker run --name selfoss -d -p 8000:8888 -e CRON_PERIOD=30m -v /root/selfoss:/selfoss/data hardware/selfoss</code></pre>
<p>配置文件和数据都存放在<code>/root/selfoss</code>目录，<code>rss</code>刷新间隔为<code>30</code>分钟，都可自行修改。</p>
<p>此时站点访问地址为<code>ip:8000</code>，如果想加登录用户和密码的，访问<code>ip:8000/password</code>生成<code>hash</code>密码，再编辑<code>/root/selfoss/config.ini</code>文件，修改如下：</p>
<pre><code>#分别为登录用户名和哈希密码
username=moerats
password=kjl1289$swpaf4JPllpKJQp94h/LF1</code></pre>
<p>然后使用<code>docker restart selfoss</code>命令重启生效。</p>
<p>最后如果你要是想看到订阅文章里的全部内容的话，那就需要其它站点支持全文<code>RSS</code>，而不是摘要，对于摘要<code>RSS</code>的，可以通过工具转换成全文<code>RSS</code>，这里提供<code>2</code>个转换的站点。</p>
<pre><code>https://feedex.net/
https://fivefilters.org/content-only/</code></pre>
<p>最后对于其它新闻网站，<code>B</code>站什么的，可以借用万能的<code>RSS</code>生成工具<code>RSSHUB</code>，介绍和使用查看→<a href="https://www.moerats.com/archives/587/" target="_blank" rel="noopener">传送门</a>。</p>
<div class="entry-readmore"><div class="entry-readmore-btn"></div></div>                                                        <div class="entry-copyright"><p>原创文章，作者：jamestackk，如若转载，请注明出处：https://blog.ytso.com/tech/pnotes/246959.html</p></div>                        </div>

                        <div class="entry-tag"><a href="https://blog.ytso.com/tag/apache" rel="tag">apache</a><a href="https://blog.ytso.com/tag/centos" rel="tag">centos</a><a href="https://blog.ytso.com/tag/css" rel="tag">CSS</a><a href="https://blog.ytso.com/tag/docker" rel="tag">Docker</a><a href="https://blog.ytso.com/tag/fedora" rel="tag">Fedora</a><a href="https://blog.ytso.com/tag/html" rel="tag">html</a><a href="https://blog.ytso.com/tag/mysql" rel="tag">mysql</a><a href="https://blog.ytso.com/tag/nginx" rel="tag">nginx</a><a href="https://blog.ytso.com/tag/ubuntu" rel="tag">Ubuntu</a></div>
                        <div class="entry-action">
                            <div class="btn-zan" data-id="246959"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-thumb-up-fill"></use></svg></i> 赞 <span class="entry-action-num">(0)</span></div>
                                                    </div>

                        <div class="entry-bar">
                            <div class="entry-bar-inner">
                                                                <div class="entry-bar-info entry-bar-info2">
                                    <div class="info-item meta">
                                                                                    <a class="meta-item j-heart" href="javascript:;" data-id="246959"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-star"></use></svg></i> <span class="data">0</span></a>                                        <a class="meta-item" href="#comments"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-comment"></use></svg></i> <span class="data">0</span></a>                                                                            </div>
                                    <div class="info-item share">
                                                                                    <a class="meta-item mobile j-mobile-share" href="javascript:;" data-id="246959" data-qrcode="https://blog.ytso.com/tech/pnotes/246959.html">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-share"></use></svg></i> 生成海报                                            </a>
                                                                                    <a class="meta-item wechat" data-share="wechat" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-wechat"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item weibo" data-share="weibo" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-weibo"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item qq" data-share="qq" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qq"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item qzone" data-share="qzone" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-qzone"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item douban" data-share="douban" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-douban"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item linkedin" data-share="linkedin" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-linkedin"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item facebook" data-share="facebook" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-facebook"></use></svg></i>                                            </a>
                                                                                    <a class="meta-item twitter" data-share="twitter" target="_blank" rel="nofollow noopener noreferrer" href="#">
                                                <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-twitter"></use></svg></i>                                            </a>
                                                                            </div>
                                    <div class="info-item act">
                                        <a href="javascript:;" id="j-reading"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-article"></use></svg></i></a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                                            <div class="entry-page">
                    <div class="entry-page-prev entry-page-nobg">
                <a href="https://blog.ytso.com/tech/pnotes/248044.html" title="wordpress禁止搜索到页面，在搜索结果里排除页面" rel="prev">
                    <span>wordpress禁止搜索到页面，在搜索结果里排除页面</span>
                </a>
                <div class="entry-page-info">
                    <span class="pull-left"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-left-double"></use></svg></i> 上一篇</span>
                    <span class="pull-right">2022年4月22日 09:27</span>
                </div>
            </div>
                            <div class="entry-page-next j-lazy" style="background-image: url('https://blog.ytso.com/wp-content/themes/justnews/themer/assets/images/lazy.png');" data-original="http://ytso-blog-oss-img.oss-accelerate.aliyuncs.com/wp-content/uploads/2022/04/21/20220421235701675.png">
                <a href="https://blog.ytso.com/tech/aiops/249186.html" title="百度云加速收费版与免费版的区别" rel="next">
                    <span>百度云加速收费版与免费版的区别</span>
                </a>
                <div class="entry-page-info">
                    <span class="pull-right">下一篇 <i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-arrow-right-double"></use></svg></i></span>
                    <span class="pull-left">2022年4月22日 09:28</span>
                </div>
            </div>
            </div>
                                                                <div class="entry-related-posts">
                            <h3 class="entry-related-title">相关推荐</h3><ul class="entry-related cols-3 post-loop post-loop-list"><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/273902.html" target="_blank" rel="bookmark">
        <span>Windows的磁盘空间已满，但是Ubuntu的/dev/sda显示很多磁盘未使用；</span>
    </a>
    <span class="date">2022年7月12日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/pnotes/22093.html" target="_blank" rel="bookmark">
        <span>STL是什么（STL简介）</span>
    </a>
    <span class="date">2021年7月20日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/pnotes/22214.html" target="_blank" rel="bookmark">
        <span>JSP response对象：响应客户端的请求并向客户端输出信息</span>
    </a>
    <span class="date">2021年7月20日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/industrynews/48246.html" target="_blank" rel="bookmark">
        <span>Canonical 已经开始讨论关于 Convergence 与 Ubuntu 14.10 的功能</span>
    </a>
    <span class="date">2021年8月6日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/268364.html" target="_blank" rel="bookmark">
        <span>docker中nginx</span>
    </a>
    <span class="date">2022年6月19日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/bigdata/273743.html" target="_blank" rel="bookmark">
        <span>Mysql 连接</span>
    </a>
    <span class="date">2022年7月12日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/pnotes/247184.html" target="_blank" rel="bookmark">
        <span>WordPress 博客留言板插件DMSGuestbook</span>
    </a>
    <span class="date">2022年4月20日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/pnotes/50348.html" target="_blank" rel="bookmark">
        <span>Debian 创始人在 Twitter 上宣称自杀！并已删除 Twitter 账号</span>
    </a>
    <span class="date">2021年8月6日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/pnotes/228228.html" target="_blank" rel="bookmark">
        <span>Java读取修改Properties文件详解编程语言</span>
    </a>
    <span class="date">2022年1月11日</span>
</li><li class="item">
    <a href="https://blog.ytso.com/tech/aiops/54268.html" target="_blank" rel="bookmark">
        <span>Centos6.5搭建MongoDB数据库主从架构详细实验步骤</span>
    </a>
    <span class="date">2021年8月7日</span>
</li></ul>                        </div>
                    
<div id="comments" class="entry-comments">
    	<div id="respond" class="comment-respond">
		<h3 id="reply-title" class="comment-reply-title">发表回复 <small><a rel="nofollow" id="cancel-comment-reply-link" href="/tech/pnotes/246959.html#respond" style="display:none;"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-close"></use></svg></i></a></small></h3><div class="comment-form"><div class="comment-must-login">请登录后评论...</div><div class="form-submit"><div class="form-submit-text pull-left"><a href="https://blog.ytso.com/login">登录</a>后才能评论</div> <button name="submit" type="submit" id="must-submit" class="wpcom-btn btn-primary btn-xs submit">提交</button></div></div>	</div><!-- #respond -->
		</div><!-- .comments-area -->
                </article>
                    </main>
            <aside class="sidebar">
        <div class="widget widget_search"><form class="search-form" action="https://blog.ytso.com/" method="get" role="search">
    <input type="search" class="keyword" name="s" maxlength="100" placeholder="输入关键词搜索..." value="">
    <button type="submit" class="submit"><i class="wpcom-icon wi"><svg aria-hidden="true"><use xlink:href="#wi-search"></use></svg></i></button>
</form></div><div class="widget widget_tag_cloud"><h3 class="widget-title"><span>热门标签</span></h3><div class="tagcloud"><a href="https://blog.ytso.com/tag/ai" class="tag-cloud-link tag-link-248 tag-link-position-1" style="font-size: 10.625pt;" aria-label="AI (11,871 项)">AI<span class="tag-link-count"> (11871)</span></a>
<a href="https://blog.ytso.com/tag/aliyun" class="tag-cloud-link tag-link-186 tag-link-position-2" style="font-size: 22pt;" aria-label="aliyun (95,062 项)">aliyun<span class="tag-link-count"> (95062)</span></a>
<a href="https://blog.ytso.com/tag/android" class="tag-cloud-link tag-link-214 tag-link-position-3" style="font-size: 10pt;" aria-label="Android (10,391 项)">Android<span class="tag-link-count"> (10391)</span></a>
<a href="https://blog.ytso.com/tag/c" class="tag-cloud-link tag-link-106 tag-link-position-4" style="font-size: 11.75pt;" aria-label="c (14,593 项)">c<span class="tag-link-count"> (14593)</span></a>
<a href="https://blog.ytso.com/tag/go" class="tag-cloud-link tag-link-109 tag-link-position-5" style="font-size: 8.375pt;" aria-label="go (7,786 项)">go<span class="tag-link-count"> (7786)</span></a>
<a href="https://blog.ytso.com/tag/google" class="tag-cloud-link tag-link-193 tag-link-position-6" style="font-size: 13.75pt;" aria-label="google (20,654 项)">google<span class="tag-link-count"> (20654)</span></a>
<a href="https://blog.ytso.com/tag/html" class="tag-cloud-link tag-link-8 tag-link-position-7" style="font-size: 8.75pt;" aria-label="html (8,304 项)">html<span class="tag-link-count"> (8304)</span></a>
<a href="https://blog.ytso.com/tag/https" class="tag-cloud-link tag-link-773 tag-link-position-8" style="font-size: 10.125pt;" aria-label="https (10,802 项)">https<span class="tag-link-count"> (10802)</span></a>
<a href="https://blog.ytso.com/tag/iphone" class="tag-cloud-link tag-link-213 tag-link-position-9" style="font-size: 13.875pt;" aria-label="iPhone (21,436 项)">iPhone<span class="tag-link-count"> (21436)</span></a>
<a href="https://blog.ytso.com/tag/jd" class="tag-cloud-link tag-link-187 tag-link-position-10" style="font-size: 8.125pt;" aria-label="jd (7,444 项)">jd<span class="tag-link-count"> (7444)</span></a>
<a href="https://blog.ytso.com/tag/linux" class="tag-cloud-link tag-link-110 tag-link-position-11" style="font-size: 13.125pt;" aria-label="linux (18,686 项)">linux<span class="tag-link-count"> (18686)</span></a>
<a href="https://blog.ytso.com/tag/md" class="tag-cloud-link tag-link-226 tag-link-position-12" style="font-size: 8.75pt;" aria-label="MD (8,346 项)">MD<span class="tag-link-count"> (8346)</span></a>
<a href="https://blog.ytso.com/tag/microsoft" class="tag-cloud-link tag-link-179 tag-link-position-13" style="font-size: 8.25pt;" aria-label="microsoft (7,561 项)">microsoft<span class="tag-link-count"> (7561)</span></a>
<a href="https://blog.ytso.com/tag/phone" class="tag-cloud-link tag-link-215 tag-link-position-14" style="font-size: 14pt;" aria-label="Phone (21,786 项)">Phone<span class="tag-link-count"> (21786)</span></a>
<a href="https://blog.ytso.com/tag/python" class="tag-cloud-link tag-link-111 tag-link-position-15" style="font-size: 8pt;" aria-label="python (7,226 项)">python<span class="tag-link-count"> (7226)</span></a>
<a href="https://blog.ytso.com/tag/windows" class="tag-cloud-link tag-link-112 tag-link-position-16" style="font-size: 13.125pt;" aria-label="windows (18,482 项)">windows<span class="tag-link-count"> (18482)</span></a>
<a href="https://blog.ytso.com/tag/%e4%ba%ba%e5%b7%a5%e6%99%ba%e8%83%bd" class="tag-cloud-link tag-link-244 tag-link-position-17" style="font-size: 9.75pt;" aria-label="人工智能 (9,889 项)">人工智能<span class="tag-link-count"> (9889)</span></a>
<a href="https://blog.ytso.com/tag/%e5%ae%89%e5%85%a8" class="tag-cloud-link tag-link-219 tag-link-position-18" style="font-size: 15.5pt;" aria-label="安全 (28,526 项)">安全<span class="tag-link-count"> (28526)</span></a>
<a href="https://blog.ytso.com/tag/%e5%bc%80%e6%ba%90" class="tag-cloud-link tag-link-199 tag-link-position-19" style="font-size: 12.625pt;" aria-label="开源 (16,950 项)">开源<span class="tag-link-count"> (16950)</span></a>
<a href="https://blog.ytso.com/tag/%e5%be%ae%e8%bd%af" class="tag-cloud-link tag-link-178 tag-link-position-20" style="font-size: 11.25pt;" aria-label="微软 (13,275 项)">微软<span class="tag-link-count"> (13275)</span></a>
<a href="https://blog.ytso.com/tag/%e6%89%8b%e6%9c%ba" class="tag-cloud-link tag-link-223 tag-link-position-21" style="font-size: 13.875pt;" aria-label="手机 (21,138 项)">手机<span class="tag-link-count"> (21138)</span></a>
<a href="https://blog.ytso.com/tag/%e6%b8%b8%e6%88%8f" class="tag-cloud-link tag-link-222 tag-link-position-22" style="font-size: 11.25pt;" aria-label="游戏 (13,254 项)">游戏<span class="tag-link-count"> (13254)</span></a>
<a href="https://blog.ytso.com/tag/%e7%99%be%e5%ba%a6" class="tag-cloud-link tag-link-225 tag-link-position-23" style="font-size: 8pt;" aria-label="百度 (7,189 项)">百度<span class="tag-link-count"> (7189)</span></a>
<a href="https://blog.ytso.com/tag/%e7%a1%ac%e4%bb%b6" class="tag-cloud-link tag-link-224 tag-link-position-24" style="font-size: 11.75pt;" aria-label="硬件 (14,378 项)">硬件<span class="tag-link-count"> (14378)</span></a>
<a href="https://blog.ytso.com/tag/%e7%be%8e%e5%9b%bd" class="tag-cloud-link tag-link-221 tag-link-position-25" style="font-size: 13.625pt;" aria-label="美国 (20,456 项)">美国<span class="tag-link-count"> (20456)</span></a>
<a href="https://blog.ytso.com/tag/%e8%8b%b9%e6%9e%9c" class="tag-cloud-link tag-link-191 tag-link-position-26" style="font-size: 9.75pt;" aria-label="苹果 (10,017 项)">苹果<span class="tag-link-count"> (10017)</span></a>
<a href="https://blog.ytso.com/tag/%e8%a7%82%e5%af%9f" class="tag-cloud-link tag-link-220 tag-link-position-27" style="font-size: 8.25pt;" aria-label="观察 (7,533 项)">观察<span class="tag-link-count"> (7533)</span></a>
<a href="https://blog.ytso.com/tag/%e8%b0%b7%e6%ad%8c" class="tag-cloud-link tag-link-198 tag-link-position-28" style="font-size: 9pt;" aria-label="谷歌 (8,726 项)">谷歌<span class="tag-link-count"> (8726)</span></a>
<a href="https://blog.ytso.com/tag/%e8%bd%a6" class="tag-cloud-link tag-link-188 tag-link-position-29" style="font-size: 15.375pt;" aria-label="车 (28,069 项)">车<span class="tag-link-count"> (28069)</span></a>
<a href="https://blog.ytso.com/tag/%e9%80%9a%e4%bf%a1" class="tag-cloud-link tag-link-216 tag-link-position-30" style="font-size: 8.125pt;" aria-label="通信 (7,496 项)">通信<span class="tag-link-count"> (7496)</span></a></div>
</div>    </aside>
    </div>
<!--WPFC_FOOTER_START--></div>
<footer class="footer">
    <div class="container">
        <div class="footer-col-wrap footer-with-none">
                        <div class="footer-col footer-col-copy">
                <error>
    <code>wp_die</code>
    <title><![CDATA[WordPress &amp;rsaquo; Error]]></title>
    <message><![CDATA[&lt;h1&gt;Error establishing a Redis connection&lt;/h1&gt;
&lt;p&gt;To disable Redis, delete the &lt;code&gt;object-cache.php&lt;/code&gt; file in the &lt;code&gt;/wp-content/&lt;/code&gt; directory.&lt;/p&gt;
]]></message>
    <data>
        <status>500</status>
    </data>
</error>
<!--
Performance optimized by Redis Object Cache. Learn more: https://wprediscache.com

Retrieved 2451 objects (378 KB) from Redis using Predis (v2.4.0).
-->
