FreshRSS
freshrss是一个开源免费可自建的 RSS 阅读器,提供两种 RSS 的 API。
安装
$ yay -S freshrss # pacman -S php-fpm / php7-fpm / php74-fpm # 之后以php74为例 # pacman -S sqlite / mariadb # pacman -S pm2
启动
# systemctl enable php74-fpm # systemctl start php74-fpm
nginx
新建/etc/nginx/sites-enabled/rss.conf
,替换 YOUR_PHP-FPM_DIR
YOUR_KEY_FILE
YOUR_CRT_FILE
YOUR_DOMAIN
为自己的内容。
server { listen 80; server_name YOUR_DOMAIN; return 301 https://$server_name$request_uri; } server { listen 443 ssl http2; server_name YOUR_DOMAIN; root /usr/share/webapps/freshrss; ssl_certificate YOUR_CRT_FILE; ssl_certificate_key YOUR_KEY_FILE; ssl_session_cache builtin:1000 shared:SSL:10m; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers HIGH:!aNULL:!eNULL:!EXPORT:!CAMELLIA:!DES:!MD5:!PSK:!RC4; ssl_prefer_server_ciphers on; access_log /var/log/nginx/freshrss_access.log; error_log /var/log/nginx/freshrss_error.log; location / { index index.php index.html index.htm; } location ~ \.php$ { # 404 try_files $fastcgi_script_name =404; # default fastcgi_params include fastcgi_params; # fastcgi settings fastcgi_pass unix:/run/YOUR_PHP-FPM_DIR/php-fpm.sock; #php74-fpm路径为/run/php74-fpm/php-fpm.sock fastcgi_index index.php; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; # fastcgi params fastcgi_param DOCUMENT_ROOT $realpath_root; fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; #fastcgi_param PHP_ADMIN_VALUE "open_basedir=$base/:/usr/lib/php/:/tmp/"; } }
php
cd /etc/php74 或者 /etc/php7 或者 /etc/php $ vim php.ini
删除;extension=pdo_sqlite
&;extension=sqlite3
前的;
自动刷新
# cd /usr/lib/systemd/system
新建freshrss.service
,/usr/bin/php74
应为相应版本的php
[Unit]Description=FreshRSS get new content Wants=freshrss.timer
[Service] User=root Type=simple
ExecStart=/usr/bin/php74 /usr/share/webapps/freshrss/app/actualize_script.php
新建freshrss.timer
[Unit]Description=FreshRSS get new content
[Timer] OnBootSec=30s OnCalendar=*:0/5
[Install]
WantedBy=timers.target
解释:每5min运行一次 运行
# systemctl enable freshrss.timer # systemctl daeamon-reload