How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China
Use Tiny Tiny RSS to protect your privacy while reading news feeds.
https://linux.cn/article-12264-1.htmlAuthor: Patrick H. MullinsTranslator: Xiaobin.Liu

Tiny Tiny RSS (TT-RSS) is a free and open-source web-based news feed(feed) (RSS/Atom) reader and aggregator. It is perfect for those who value privacy and still rely on RSS to get daily news. TT-RSS is self-hosted software, so you have 100% control over your server, data, and your complete privacy. It also supports a large number of plugins, extensions, and themes. Do you like a dark mode interface? No problem. Want to filter incoming messages based on keywords? TT-RSS can make that happen too.

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

Tiny Tiny RSS screenshot

Now that you know what TT-RSS is, let’s discuss why you might want to use it. I will cover everything you need to know to install it on a Raspberry Pi or a Debian 10 server.

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

Installing and configuring TT-RSS

To install TT-RSS on a Raspberry Pi, you will also need to install and configure the latest version of PHP (as of this writing, the latest version of PHP is 7.3), the backend database PostgreSQL, the Nginx web server, Git, and finally TT-RSS.

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

1. Install PHP 7

Installing PHP 7 is the most complex part of the process. Fortunately, it is not as difficult as it seems. Start by installing the following support packages:

$ sudo apt install -y ca-certificates apt-transport-https

Now, add the repository PGP key:

$ wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -

The next step is to add the PHP library to your apt sources:

$ echo "deb https://packages.sury.org/php/ buster main" | sudo tee /etc/apt/sources.list.d/php.list

Then update your repository index:

$ sudo apt update

Finally, install PHP 7.3 (or the latest version) and some common components:

$ sudo apt install -y php7.3 php7.3-cli php7.3-fpm php7.3-opcache php7.3-curl php7.3-mbstring php7.3-pgsql php7.3-zip php7.3-xml php7.3-gd php7.3-intl

The above command assumes you are using the PostgreSQL backend database and will install php7.3-pgsql. If you want to use MySQL or MariaDB, you can change the command parameter to php7.3-mysql.

Next, confirm that PHP is installed and running on your Raspberry Pi:

$ php -v

Now it’s time to install and configure the web server.

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

2. Install Nginx

You can install Nginx with the following command:

$ sudo apt install -y nginx

Modify the default Nginx virtual host configuration so that the web server can recognize PHP files and know how to handle them.

$ sudo nano /etc/nginx/sites-available/default

You can safely delete all the contents of the original file and replace it with the following:

server {
        listen 80 default_server;
        listen [::]:80 default_server;

        root /var/www/html;
        index index.html index.htm index.php;
        server_name _;

        location / {
                try_files $uri $uri/ =404;
        }

        location ~ \.php$ {
          include snippets/fastcgi-php.conf;
          fastcgi_pass unix:/run/php/php7.3-fpm.sock;
        }

}

Press Ctrl+O to save the modified configuration file, then press Ctrl+X to exit Nano. You can test your new configuration file with the following command:

$ nginx -t

If there are no errors, restart the Nginx service:

$ systemctl restart nginx

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

3. Install PostgreSQL

Next is to install the database server. Installing PostgreSQL on a Raspberry Pi is super simple:

$ sudo apt install -y postgresql postgresql-client postgis

Enter the following command to check if the database server was installed successfully:

$ psql --version

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

4. Create Tiny Tiny RSS Database

Before doing anything else, you need to create a database to save data for the TT-RSS software. First, log in to the PostgreSQL server:

sudo -u postgres psql

Next, create a new user and set a password:

CREATE USER username WITH PASSWORD 'your_password' VALID UNTIL 'infinity';

Then create a database for TT-RSS:

CREATE DATABASE tinyrss;

Finally, grant the new user full privileges:

GRANT ALL PRIVILEGES ON DATABASE tinyrss to user_name;

This is the step for installing the database. You can type \q to exit the psql program.

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

5. Install Git

Installing TT-RSS requires Git, so enter the following command to install Git:

$ sudo apt install git -y

Now, navigate to the root directory of the Nginx server:

$ cd /var/www/html

Download the latest TT-RSS source code:

$ git clone https://git.tt-rss.org/fox/tt-rss.git tt-rss

Note that this step will create a tt-rss folder.

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

6. Install and Configure Tiny Tiny RSS

Now it’s the final moment to install and configure your new TT-RSS server. First, confirm that you can open http://your.site/tt-rss/install/index.php in your browser. If the browser shows 403 Forbidden, then it means the permissions for the /var/www/html folder are not set correctly. The following command usually resolves this issue:

$ chmod 755 /var/www/html/ -v

If everything is okay, you will see the TT-RSS installation page, which will prompt you to enter some information. You only need to input the database username and password you created earlier; the database name; hostname as localhost; and port as 5432.

Click “Test Configuration”. If everything is okay, you will see a red button labeled “Initialize Database”. Click it to start the installation. When finished, you will see a configuration file that you can copy to the TT-RSS directory and save as config.php.

After the installation process is complete, enter http://yoursite/tt-rss/ in your browser to open TT-RSS, and log in with the default credentials (username: admin, password: password). After logging in, the system will prompt you to change your password. I strongly recommend changing your password as soon as possible.

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

Configuring TT-RSS

If everything is okay, you can now start using TT-RSS. It is recommended to create a non-admin user, log in with the new username, and start importing your feeds and subscriptions, configuring it as you wish.

Finally, and this is super important, don’t forget to read the Updating Feeds section on the TT-RSS wiki. It explains how to create a simple systemd service to update feeds. If you skip this step, your RSS feeds will not update automatically.

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

Conclusion

Phew! That was quite a workload, but you did it! You now have your own RSS aggregation server. Want to learn more about TT-RSS? I recommend checking out the official FAQ, support forums, and detailed installation notes. If you have any questions, feel free to comment below.

via: https://opensource.com/article/20/2/ttrss-raspberry-pi

Author: Patrick H. Mullins Topic: lujun9972 Translator: lxbwolf Proofreader: wxy

This article is originally translated by LCTT and proudly presented by Linux China

How to Install Tiny Tiny RSS on Raspberry Pi | Linux China

Leave a Comment

×