• 欢迎访问db1024网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏db1024吧

一款开源,简单的轻量级RSS阅读器:selfoss安装教程

建站知识 Liam 1年前 (2019-06-05) 591次浏览 20个评论 扫描二维码
文章目录[隐藏]

说明:关于RSS订阅器,之前发过不少了,比如FeedbinFreshRSS等,功能都挺强大的,这里就再介绍个轻量级的RSS订阅器selfoss,使用起来是非常简单的,界面颜值也还不错,支持很多种订阅和网站,比如TwitterGithubTumblr等。

截图

一款开源,简单的轻量级RSS阅读器:selfoss安装教程
一款开源,简单的轻量级RSS阅读器:selfoss安装教程
一款开源,简单的轻量级RSS阅读器:selfoss安装教程

安装

Github地址:https://github.com/SSilence/selfoss

环境要求:PHP 5.4+MySQL 5.5+PostgreSQLSqliteApacheNginxLighttpd

这里就大概说3种安装方法,宝塔安装、手动安装和Docker安装,数据库均使用Sqlite,建议直接使用Docker安装。

1、安装宝塔

#CentOS系统 wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh #Ubuntu系统 wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh #Debian系统 wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && bash install.sh 

安装完成后,进入面板,点击左侧软件管理,然后安装PHP 5.6+NginxApache

2、安装程序
再点击左侧网站,添加域名,然后在SSH客户端运行命令:

#进入网站根目录,将路径修改成自己的再运行 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 && 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/ 

Nginx还需要点击站点设置,设置伪静态,代码如下:

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 ~ .*.(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;  } 

然后就可以打开站点了,最开始是没登录界面的,也就是每个人都可以直接使用,然后我们可以编辑config.ini配置文件来添加登录界面,修改以下参数:

#分别为站点地址,登录用户名和哈希密码 base_url=https://www.moerats.com username=moerats password=kjl1289$swpaf4JPllpKJQp94h/LF1 

密码可以访问http://www.moerats.com/password生成,将域名修改成自己的selfoss站点域名,更多的配置文件设置可以查看官方说明→传送门

3、设置RSS刷新
点击宝塔左侧-计划任务,类型访问URL,地址填上http://www.moerats.com/update,将域名修改成自己的,时间的话,建议每30分钟。

手动安装

这里只适用于Debian89系统,建议直接Debian 9

1、安装环境

#Debian 8系统 echo "deb http://packages.dotdeb.org jessie all" | tee --append /etc/apt/sources.list echo "deb-src http://packages.dotdeb.org jessie all" | 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 

2、安装程序

#新建网站根目录 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 && 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/ 

3、新建站点配置文件

#将域名修改为自己的,然后一起复制进SSH运行即可 cat > /etc/nginx/conf.d/selfoss.conf << "EOF" 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 

再使用systemctl restart nginx命令重启Nginx生效。如果想给RSS站点加用户名密码登录的可参考上面的宝塔安装方法。

4、设置RSS刷新

#设置为每30分钟执行一次,将域名修改为自己的 echo "*/30 * * * * /usr/bin/curl -Ls 'http://www.moerats.com/update' >/dev/null" > bt.cron crontab bt.cron rm -rf bt.cron 

使用求最后crontab -l命令查看添加成功没。

Docker安装

1、安装Docker

#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 

2、拉取镜像

docker run --name selfoss -d -p 8000:8888 -e CRON_PERIOD=30m -v /root/selfoss:/selfoss/data hardware/selfoss

配置文件和数据都存放在/root/selfoss目录,rss刷新间隔为30分钟,都可自行修改。

此时站点访问地址为ip:8000,如果想加登录用户和密码的,访问ip:8000/password生成hash密码,再编辑/root/selfoss/config.ini文件,修改如下:

#分别为登录用户名和哈希密码 username=moerats password=kjl1289$swpaf4JPllpKJQp94h/LF1

然后使用docker restart selfoss命令重启生效。

最后如果你要是想看到订阅文章里的全部内容的话,那就需要其它站点支持全文RSS,而不是摘要,对于摘要RSS的,可以通过工具转换成全文RSS,这里提供2个转换的站点。

https://feedex.net/ https://fivefilters.org/content-only/

最后对于其它新闻网站,B站什么的,可以借用万能的RSS生成工具RSSHUB,介绍和使用查看→传送门


db1024 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:一款开源,简单的轻量级RSS阅读器:selfoss安装教程
喜欢 (0)
关于作者:
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
(20)个小伙伴在吐槽
  1. You really make it seem so easy with your presentation but I find this matter to be really something which I think I would never understand. It seems too complicated and extremely broad for me. I am looking forward for your next post, I will try to get the hang of it!
    web hosting sites2020-08-31 22:16 回复 Windows 7 | 360浏览器 SE
  2. First of all I want to say awesome blog! I had a quick question which I'd like to ask if you don't mind. I was interested to know how you center yourself and clear your mind prior to writing. I've had trouble clearing my mind in getting my thoughts out. I do enjoy writing but it just seems like the first 10 to 15 minutes are generally wasted simply just trying to figure out how to begin. Any ideas or hints? Appreciate it!
    black mass2020-08-31 13:56 回复 Mac OS X | Chrome 67.0.3396.87
  3. Thanks for the marvelous posting! I truly enjoyed reading it, you could be a great author. I will be sure to bookmark your blog and may come back someday. I want to encourage yourself to continue your great work, have a nice weekend!
    cheap flights2020-08-27 06:15 回复 Mac OS X | Chrome 66.0.3359.139
  4. Magnificent beat ! I would like to apprentice at the same time as you amend your site, how can i subscribe for a weblog site? The account aided me a acceptable deal. I had been tiny bit familiar of this your broadcast offered vibrant transparent idea 3gqLYTc cheap flights
    cheap flights2020-08-24 20:38 回复 Linux | Chrome 68.0.3398.0
  5. Very shortly this website will be famous amid all blogging and site-building viewers, due to it's fastidious articles or reviews
    cheap flights2020-08-24 19:22 回复 Windows 7 | Internet Explorer 10.0
  6. Does your website have a contact page? I'm having a tough time locating it but, I'd like to send you an email. I've got some ideas for your blog you might be interested in hearing. Either way, great site and I look forward to seeing it develop over time.
    web hosting company2020-08-14 11:03 回复 Mac OS X | Chrome 53.0.2785.143
  7. Greetings from Carolina! I'm bored to death at work so I decided to browse your site on my iphone during lunch break. I really like the knowledge you provide here and can't wait to take a look when I get home. I'm surprised at how fast your blog loaded on my cell phone .. I'm not even using WIFI, just 3G .. Anyways, superb blog!
    web hosting reviews2020-08-14 08:29 回复 Linux | Firefox浏览器 56.0.4
  8. Way cool! Some extremely valid points! I appreciate you writing this post plus the rest of the website is extremely good. adreamoftrains website hosting services
    adreamoftrains website host2020-08-12 08:47 回复 Linux | Chrome 67.0.3396.87
  9. Remarkable things here. I am very happy to peer your article. Thanks so much and I'm looking forward to touch you. Will you please drop me a e-mail?
    web hosting services2020-08-12 02:31 回复 Linux | Chrome 66.0.3359.139
  10. Today, I went to the beach front with my children. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is completely off topic but I had to tell someone!
    web hosting providers2020-08-07 22:30 回复 Linux | Chrome 64.0.3282.167
  11. I think this is among the most vital info for me. And i'm glad reading your article. But wanna remark on few general things, The web site style is perfect, the articles is really great : D. Good job, cheers
    skyscanner uk2020-07-31 13:06 回复 Linux | Firefox浏览器 56.0
  12. Howdy! This is kind of off topic but I need some guidance from an established blog. Is it hard to set up your own blog? I'm not very techincal but I can figure things out pretty fast. I'm thinking about setting up my own but I'm not sure where to start. Do you have any points or suggestions? With thanks
    booking flights2020-07-27 22:34 回复 Linux | Firefox浏览器 61.0
  13. Nice post. I was checking continuously this blog and I am impressed! Extremely helpful info specifically the last part :) I care for such information much. I was seeking this particular information for a long time. Thank you and good luck.
    web hosting company2020-07-26 05:50 回复 Mac OS X | Chrome 53.0.2785.143
  14. great points altogether, you simply received a new reader. What would you suggest about your publish that you made some days in the past? Any certain?
    website host2020-07-22 09:48 回复 Linux | Firefox浏览器 52.9
  15. This article is truly a pleasant one it helps new internet users, who are wishing in favor of blogging.
    web hosting reviews2020-07-16 19:36 回复 Linux | Chrome 51.0.2712.8
  16. Good day! I could have sworn I've been to this blog before but after going through some of the posts I realized it's new to me. Nonetheless, I'm definitely happy I found it and I'll be book-marking it and checking back frequently!
    cbd oil that works 20202020-06-29 12:28 回复 Linux | Chrome 66.0.3349.0
  17. Thankfulness to my father who informed me concerning this website, this website is genuinely awesome.
    cbd oil that works 20202020-06-28 11:23 回复 Windows 8.1 | Chrome 67.0.3396.62
  18. Does your website have a contact page? I'm having a tough time locating it but, I'd like to send you an email. I've got some ideas for your blog you might be interested in hearing. Either way, great site and I look forward to seeing it develop over time.
    cbd oil that works 20202020-06-27 15:37 回复 Linux | Chrome 66.0.3359.117
  19. Normally I do not learn article on blogs, but I wish to say that this write-up very pressured me to check out and do so! Your writing taste has been surprised me. Thanks, quite great article.
    tinyurl.com2020-06-26 23:34 回复 Windows Vista | Chrome 4.0.202.2
  20. Wow! After all I got a blog from where I be capable of actually obtain valuable facts concerning my study and knowledge.
    g rsacwgxy2020-06-22 05:58 回复 Linux | 未知浏览器