Custom css

Install Selfoss RSS Reader on Raspbian GNU Linux 10 (buster) with lighttpd and mariadb

This guide will install the Selfoss RSS reader on a Raspberry Pi

Install mariadb, php and lighttpd:

Code:


sudo apt install php-mysql php-gd php-cgi php-http lighttpd mariadb-server mariadb-client

Secure the mariadb installation by running:

Code:


sudo mysql_secure_installation

Login to the mariadb console:

Code:


sudo mysql -u root -p

In the console create the database and grand privileges to the database user:

Code:


create database selfoss;
grant all on selfoss.* to selfoss@localhost identified by 'SECURE_PASSWORD';
\q

Replace 'SECURE_PASSWORD' with a secure password.

Enable fastcgi for php in lighttpd:

Code:


sudo /usr/sbin/lighttpd-enable-mod fastcgi fastcgi-php

Change the max_execution_time to 60 in /etc/php/7.3/cgi/php.ini by running this command:

Code:


sudo sed -i 's/max_execution_time = .*/max_execution_time = '60'/' /etc/php/7.3/cgi/php.ini

Download and extract selfoss:

Code:


wget https://github.com/SSilence/selfoss/releases/download/2.18/selfoss-2.18.zip --directory-prefix=/tmp
sudo mkdir /var/www/html/selfoss
sudo unzip /tmp/selfoss-2.18.zip -d /var/www/html/selfoss/
sudo chown -R www-data:www-data /var/www/html/selfoss/
sudo chmod g+w /var/www/html/selfoss/data/cache /var/www/html/selfoss/data/favicons /var/www/html/selfoss/data/logs /var/www/html/selfoss/data/thumbnails /var/www/html/selfoss/data/sqlite /var/www/html/selfoss/public

Take a copy of the default configuration file:

Code:


sudo cp /var/www/html/selfoss/default.ini /var/www/html/selfoss/config.ini

Modify the config.ini to have this database configuration:

Code:


db_type=mysql
db_host=localhost
db_database=selfoss
db_username=selfoss
db_password='SECURE_PASSWORD'
db_port=3306
db_prefix=

Replace 'SECURE_PASSWORD' with the secure password you created when creating the database in the database console.

Edit /var/www/html/selfoss/.htaccess uncomment "RewriteBase /selfoss"

Edit /etc/lighttpd/lighttpd.conf: in server.modules uncomment "mod_rewrite" Also add these rewrite rules:

Code:


url.rewrite-once += (
"^/selfoss/favicon.ico$" => "/selfoss/public/favicon.ico",
 "^/selfoss/favicons/(.*)$" => "/selfoss/data/favicons/$1",
 "^/selfoss/thumbnails/(.*)$" => "/selfoss/data/thumbnails/$1",
 "^/selfoss/([^\?]*.(js|ico|gif|jpg|png|css|asc|txt|eot|woff|ttf|svg))(\?.*)?$" => "/selfoss/public/$1",
 "^/selfoss/index.php(.*)$" => "$0",
 "^/selfoss/([^\?]*)(\?(.*))?" => "/selfoss/index.php?$3",
 "^/selfoss/public/" => "$0",
 "^/selfoss/(.*)" => "/selfoss/index.php$1"
)

Setup a cron job to automatically update feeds by running:

Code:


sudo crontab -e

Add this line to the crontab and save and quit:

Code:


*/15 * * * * curl --silent --show-error -m 3300 -k https://127.0.0.1/selfoss/update >>/var/log/selfoss_update.log > /dev/null

Restart lighttpd:

Code:


sudo service lighttpd restart

Open selfoss in your web browser by going to http://{host-ip-address}/selfoss The first run may give a timeout error whilst it sets up the environment. From then on it should work fine.

Fixing Generic Wayland Icons for Applications in KDE Plasma If you run KDE Plasma on Wayland, you may have run into a small but persisten...