Loading... <div class="tip share">请注意,本文编写于 835 天前,最后修改于 411 天前,其中某些信息可能已经过时。</div> 自建RSS服务不仅可以使数据更可控,它还有丰富的插件可以满足各种各样的需求,比如全文内容提取、Fever API 模拟、DOM 操控、繁体转简体。 ### 安装fileinfo扩展 #### 对于lnmp 1.5+版本: 修改lnmp安装包目录下的lnmp.conf 文件,将里面的Enable_PHP_Fileinfo='n' 后面的n改成y 保存,然后 ./upgrade.sh php 升级一下PHP就会安装好fileinfo模块 #### 对于lnmp 1.4及更低版本: 建议参考:[LNMP一键环境安装Fileinfo扩展组件支持的办法][1] ### 创建vhost ```shell lnmp vhost add ``` 按以下方式配置: ```conf Please enter domain(example: www.lnmp.org): ttrss.axiss.world Your domain: ttrss.axiss.world Enter more domain name(example: lnmp.org *.lnmp.org): Please enter the directory for the domain: ttrss.axiss.world Default directory: /home/wwwroot/ttrss.axiss.world: Virtual Host Directory: /home/wwwroot/ttrss.axiss.world Allow Rewrite rule? (y/n) n You choose rewrite: none Enable PHP Pathinfo? (y/n) y Enable pathinfo. Allow access log? (y/n) n Disable access log. Create database and MySQL user with same name (y/n) y Enter current root password of Database (Password will not shown): ``` ### 安装Tiny Tiny RSS git clone https://git.tt-rss.org/fox/tt-rss.git tt-rss 复制代码到网站目录下: cp -R ttrss/* /home/wwwroot/ttrss.axiss.world 此时访问网站就可以进一步配置了。 如果出现open_basedir问题,我们可以进行关闭防跨目录。 在/root/lnmp1.6/tools目录下执行以下命令: ./remove_open_basedir_restriction.sh 然后输入你安装 Tiny Tiny RSS 的目录,比如/home/wwwroot/ttrss.axiss.world/回车运行即可。 然后点击初始化数据库,也就是initialize database按钮,然后继续点击Save configuration按钮,这时会提示你刷新页面,刷新之后会出现一个报错页面。 我们按照页面说明,切换到网站目录,依次输入命令添加权限即可。 这个时候再次刷新页面,即可进入登录页面: 配置自动更新 配置后台自动更新 Feed 订阅,这样才能及时的获取 RSS 信息。 ```yml crontab -u www -e */10 * * * * /usr/local/php/bin/php /home/wwwroot/ttrss.axiss.world/update.php --feeds > /dev/null ``` 请使用非root用户运行命令,以上表示每 10 分钟刷新一次订阅内容,这个速度基本够用了。 另外可以使用程序自带的更新方式,修改网站根目录的config.php文件,将 PHP 的path目录设置为实际的目录:/usr/local/php/bin/php并将SIMPLE_UPDATE_MODE的值设置为true即可。 define('PHP_EXECUTABLE', '/usr/local/php/bin/php'); 参考: https://tiance.me/536.html https://tstrs.me/1451.html [1]: https://www.laozuo.org/11801.html Last modification:June 29th, 2021 at 11:27 am © 允许规范转载 Support 原创不易,请我杯奶茶吧~ Appreciate the author 支付宝微信