This blog is about Java (advanced Java topics like Reflection, Byte Code transformation, Code Generation), Maven, Web technologies, Raspberry Pi and IT in general.

Samstag, 11. Mai 2013

Tutorial: How to install a Tiny Tiny RSS (tt-rss) server on a Raspberry Pi (nginx, php, mysql)


Motivation

I love the Google Reader (RSS reader) very much and I used it heavily. But sadly Google decided to shutdown this great service. So it was time to look for an alternative and I found Tiny Tiny RSS (tt-rss). It's an open source RSS reader written in PHP. It's quite nice but there is one big issue: the website (JavaScript) is slow. It's impossible to use it on a smartphone. But there are Android apps for tt-rss which are quite nice.

Install & configure nginx, php & mysql-server

  • get all the packages
sudo apt-get update
sudo apt-get install nginx php5-fpm php5-cli php5-curl php5-gd php5-mcrypt php5-mysql php5-cgi mysql-server
  •  create the web directory
sudo mkdir /var/www
sudo chown www-data:www-data /var/www/
  •  configure nginx
    • open the config file
sudo nano /etc/nginx/sites-enabled/default 
    • modify it so it looks like this
server {
  listen   80;
  root /var/www;
  index index.html index.htm index.php;

  server_name localhost;

  location / {
    try_files $uri $uri/ /index.html;
  }

  location ~ \.php$ {
    fastcgi_pass unix:/var/run/php5-fpm.sock;
    fastcgi_index index.php;
    include fastcgi_params;
  }
}
  •  configure php-fpm
    • open the php.ini
sudo nano /etc/php5/fpm/php.ini
      • set: cgi.fix_pathinfo = 0;
    • open the www.conf
sudo nano /etc/php5/fpm/pool.d/www.conf
      •  set: listen = /var/run/php5-fpm.sock
  • restart nginx and php-fpm
sudo service php5-fpm restart
sudo service nginx restart
  • create the mysql database for tt-rss
mysql -u root -p
    • insert the password and execute those two commands
create database ttrss;
exit

 

Install Tiny Tiny RSS (tt-rss)

It's quite simple. Just grab the .tar.gz file, unpack it move it to the web directory and set the permissions. It's done like this. But you probably want to check if there is a newer version.

wget https://github.com/gothfox/Tiny-Tiny-RSS/archive/1.7.8.tar.gz
tar zxfv 1.7.8.tar.gz
mv Tiny-Tiny-RSS-1.7.8/ ttrss
sudo mv ttrss /var/www
cd /var/www/ttrss
chmod -R 777 cache/images && chmod -R 777 cache/export && chmod -R 777 cache/js && chmod -R 777 feed-icons && chmod -R 777 lock


Perform the tt-rss installation

http://localhost/ttrss/install

Setup the crontab

  • Open the crontab
crontab -e
    • Insert following line
*/15 * * * * cd /var/www/ttrss && /usr/bin/php update.php --feeds --quiet > /dev/null

With this setup the Raspberry Pi will load every 15 minutes the RSS feeds and update them so you can read them.

Enjoy your Tiny Tiny RSS (tt-rss) installation

That's it. Now you can open your installation, configure it and read your feeds. Have fun! :)

6 Kommentare:

  1. Great tutorial. Thanks!

    Everything worked perfectly until I go to http:///ttrss/install

    when it checks configuration I get a

    "PHP support for MySQL is required for configured mysql in config.php."

    message.

    I'm somewhat new to php and mysql. What am I missing here.

    Thanks again,
    M.

    AntwortenLöschen
  2. Thanks for the post.Well the information looks very interesting as it explained in a most appropriate manner.

    Website Development company

    AntwortenLöschen
  3. did you ever get "PHP support for MySQL is required for configured mysql in config.php." fixed?

    AntwortenLöschen

  4. Excellent article. Very interesting to read. I really love to read such a nice article. Thanks! keep rocking. Ruby on Rails Online Course

    AntwortenLöschen