LoginSignup
0
0

More than 1 year has passed since last update.

miniflux2 on Ubuntu でRSSリーダーをつくろう

Last updated at Posted at 2021-11-17

miniflux2 on Ubuntu でRSSリーダーをつくろう

環境

  • OS: Ubuntu 20.04 LTS

Installation

# root権限で実行
# minifluxとpostgresqlのインストール
curl -s https://apt.miniflux.app/KEY.gpg | sudo apt-key add -
echo "deb https://apt.miniflux.app/ /" | sudo tee /etc/apt/sources.list.d/miniflux.list > /dev/null
apt-get update
apt-get install miniflux postgresql
pstree #postgresが起動している事を確認
su - postgres
# postgres ユーザで実行
# DBの作成
createuser -P miniflux
#username
#password
createdb -O miniflux miniflux
psql miniflux -c 'create extension hstore'
psql -c 'ALTER USER miniflux WITH SUPERUSER;'
export DATABASE_URL="postgres://username:password@localhost/miniflux"
miniflux -migrate
psql -c 'ALTER USER miniflux WITH NOSUPERUSER;'
# admin権限の作成
miniflux -create-admin
#username
#password
exit
# root権限実行
# minifluxのConfig設定
echo 'DATABASE_URL="postgres://username:password@localhost/miniflux"' >> /etc/miniflux.conf
systemctl restart miniflux
# これで127.0.0.1:8080でminifluxがLISTENする。
# LISTENポートを変えるには
# echo 'LISTEN_ADDR="127.0.0.1:8080"' >> /etc/miniflux.conf

応用

内部利用であればUNIXソケットを使ってみよう。

### root権限で実行

## postgresqlをUNIXソケットでのみ通信できるように設定する
vi /etc/postgresql/12/main/postgresql.conf
#既存のlisten_addressesディレクティブをコメントアウト
echo "listen_addresses = ''" >> /etc/postgresql/12/main/postgresql.conf
systemctl restart postgresql
netstat -anlt #psqlのポートのリッスンが無くなった事を確認
netstat -an | grep postgresql # /var/run/postgresql/.s.PGSQL.5432 が出てくるはず

## minifluxをunixソケットでpostgresqlに接続するように設定する
vi /etc/miniflux.conf
#既存のDATABASE_URLディレクティブをコメントアウト
echo 'DATABASE_URL="user=username password=password dbname=miniflux sslmode=disable host=/var/run/postgresql/"' >> /etc/miniflux.conf

## miniflux自体をunixソケットでのみ通信できるように設定する
vi /etc/miniflux.conf
#既存のLISTEN_ADDRディレクティブをコメントアウト
mkdir /run/miniflux
chown miniflux: /run/miniflux
echo 'LISTEN_ADDR=""' >> /etc/miniflux.conf
systemctl restart miniflux
netstat -anlt #minifluxのポートのリッスンが無くなった事を確認

#接続テスト
# curl --unix-socket /var/run/miniflux/miniflux.sock http://index.html

# nginxのリバースプロキシの転送先に設定
#
# https://miniflux.app/docs/howto.html#reverse-proxy-unix-socket を参考に

何に使うの?

  • エクスポート・インポート機能があるので、おすすめのOPML RSS詰め合わせセットを作って公開してみよう

minifluxのフィード一覧

  • Fever,Pinboard,Instapaper,Pocket,Wallabag,Nunux Keeper,Telegram Botと連携してみよう

関連付け

  • RSSデータベースサーバとしてminifluxを酷使しよう

自分だけのニュースサイトを作ろう https://miniflux.app/docs/api.html

Webパスワードを忘れたときのリセット方法

su postgres;
psql miniflux;
¥d;
CREATE EXTENSION pgcrypto;
UPDATE users SET password = crypt('password', gen_salt('bf')) WHERE username = 'username';
exit;
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0