静看光阴荏苒
不管不顾不问不说也不念

Yarr:一个UI很漂亮的RSS阅读器

Yarr是一个用Go开发的RSS阅读器,前端界面非常干净清爽,和macos莫名般配。

目前该项目还在积极开发中,作者后续应该会添加更多的功能。下面我水一下部署的过程。

由于作者没有预编译好的二进制文件,这里需要我们自己编译。安装一下需要用到的软件:

apt -y install build-essential supervisor nginx python-certbot-nginx apache2-utils wget
systemctl start supervisor nginx
systemctl enable supervisor nginx

安装Go语言:

wget https://golang.org/dl/go1.15.2.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.15.2.linux-amd64.tar.gz
echo 'export PATH=$PATH:/usr/local/go/bin' > /etc/profile.d/golang.sh
source /etc/profile.d/golang.sh

拉取项目文件并编译:

cd /opt
git clone https://github.com/nkanaev/yarr.git 
git clone https://github.com/nkanaev/gofeed.git 
mv gofeed yarr
cd yarr
make build_linux

完成之后在下面的目录可以看到编译好的二进制文件:

/opt/yarr/_output/linux

新建一个supervisor的配置文件:

nano /etc/supervisor/conf.d/yarr.conf

写入如下配置:

[program:yarr]
priority=1
environment=XDG_CONFIG_HOME="$HOME/.config"
directory=/opt/yarr/_output/linux
command=/opt/yarr/_output/linux/yarr -addr 127.0.0.1:7070
autostart=true
autorestart=true
redirect_stderr=true
stdout_logfile=/var/log/supervisor/yarr.log

启动yarr:

supervisorctl update

yarr有一点美中不足的是没有身份验证的功能,所以在上面的supervisor中,我把它监听到本地。

接下来使用nginx反向代理,利用nginx加一个http身份验证。首先新建一个nginx配置文件:

nano /etc/nginx/conf.d/yarr.conf

写入如下配置:

server {
    listen       80;
    server_name  yarr.imlala.best;

    location / {
        auth_basic "Please Login";
        auth_basic_user_file htpasswd;
        proxy_pass http://127.0.0.1:7070;
    }
}

使用下面的命令生成一个htpasswd文件(imlala是用户名注意替换:)

htpasswd -c /etc/nginx/htpasswd imlala

重载nginx:

systemctl reload nginx

如果需要SSL,使用下面的命令可以帮你自动配置SSL证书:

certbot --nginx --agree-tos --no-eff-email --email example@qq.com

预览:

赞(5)
未经允许不得转载:荒岛 » Yarr:一个UI很漂亮的RSS阅读器
分享到: 更多 (0)

评论 7

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    才发现自己的博客还没添加RSS :grin:

    Foliage4年前 (2020-09-21) Google Chrome 85.0.4183.102 Google Chrome 85.0.4183.102 Windows 10 x64 Edition Windows 10 x64 Edition回复
  2. #2

    大佬 最近这个部署方式好像不行了 我在进行到 git clone https://github.com/nkanaev/gofeed.git 这一步时出现了 Username for ‘https://github.com’ 的反馈 然后我去作者的 github 上看了看 好像作者已经提供了二进制文件?麻烦大佬有时间再水一篇 :cry:

    cossxiu3年前 (2020-11-17) Google Chrome 86.0.4240.183 Google Chrome 86.0.4240.183 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 好的,这个程序作者还在积极开发,有些配置估计会变化的很快。

      LALA3年前 (2020-11-17) Google Chrome 86.0.4240.75 Google Chrome 86.0.4240.75 Windows 10 x64 Edition Windows 10 x64 Edition回复
  3. #3

    https://github.com/nkanaev/gofeed.git项目被作者删除了,请问该如何自己编译呢? :arrow:

    唐风月3年前 (2020-12-08) Google Chrome 87.0.4280.88 Google Chrome 87.0.4280.88 Windows 10 x64 Edition Windows 10 x64 Edition回复
    • 不用自己编译了,作者有提供二进制文件了,下载完给个执行权限直接运行就好了。

      LALA3年前 (2020-12-09) Google Chrome 86.0.4240.75 Google Chrome 86.0.4240.75 Windows 10 x64 Edition Windows 10 x64 Edition回复
  4. #4

    初看评论还以为是 gofeed 闭源了。
    看了一眼 dockerfile ( https://github.com/nkanaev/yarr/blob/master/dockerfile ) ,里面有编译的步骤。
    看样子只是两个项目整合到了一起。

    Lindsay3年前 (2020-12-30) Google Chrome 87.0.4280.109 Google Chrome 87.0.4280.109 Google Chrome OS x64 Google Chrome OS x64回复

分享创造快乐

广告合作资源投稿