Difference between revisions of "TT-RSS"

From ArchWiki
Jump to: navigation, search
(Set up database: - database name should not be wrapped in qoutes)
m (name of update daemon was changed to just tt-rss)
(10 intermediate revisions by 6 users not shown)
Line 1: Line 1:
 
[[Category:Internet Applications]]
 
[[Category:Internet Applications]]
 +
[[ja:TT-RSS]]
 
Tiny Tiny RSS is an open source web-based news feed (RSS/Atom) aggregator, designed to allow you to read news from any location, while feeling as close to a real desktop application as possible.
 
Tiny Tiny RSS is an open source web-based news feed (RSS/Atom) aggregator, designed to allow you to read news from any location, while feeling as close to a real desktop application as possible.
  
 
==Installation==
 
==Installation==
Install from [[AUR]]:{{AUR|tt-rss}}
+
Install {{pkg|tt-rss}} from the [[official repositories]].
  
 
===Set up database===
 
===Set up database===
You'll need to set up a database, either [[mysql]] or [[postgresql]]. Create a user and database, e.g. with mysql:
+
You'll need to set up a database, either [[MySQL]] or [[postgresql]]. Create a user and database, e.g. with mysql:
  
 
  $ mysql -p -u root
 
  $ mysql -p -u root
Line 24: Line 25:
 
  # ln -s /usr/share/webapps/tt-rss /srv/http/tt-rss  
 
  # ln -s /usr/share/webapps/tt-rss /srv/http/tt-rss  
  
====Closing basedirs for non-tt-rss webapps====
+
====Custom php.ini and Closing basedirs for non-tt-rss webapps====
If you want the php open_basedir setting to only apply to the tt-rss location, you can add this to {{ic|/etc/httpd/conf/httpd.conf}}:
+
[note: update_daemon2.php has been changed and no longer passes on the php.ini config specified by -c. This will not work until that is fixed.]
+
 
 +
If you want the php open_basedir setting to only apply to the tt-rss location, you can create a custom php config file for tt-rss. Copy your {{ic|/etc/php/php.ini}} file to {{ic|/etc/webapps/tt-rss/php.ini}} and edit open_basedir and any other options specific to tt-rss. Then add to your apache config:
 +
 
 
  <Location /tt-rss/>
 
  <Location /tt-rss/>
       php_admin_value open_basedir none
+
       PHPINIDir /etc/webapps/tt-rss
 
  </Location>
 
  </Location>
  
However, this will make the update daemon (see below) fail. It might be able to fix it by making your own daemon that uses its own php.ini file, or simply a crontab entry like this (assuming you put the ini file into {{ic|/etc/webapps/tt-rss}}:
+
or your apache vitural host config:
 +
 +
<VirtualHost *:80>
 +
      ...
 +
      PHPINIDir /etc/webapps/tt-rss
 +
</VirtualHost>
 +
 
 +
Note: the {{ic|VirtualHost}} solution is tested and working, users have reported issues adding {{ic|PHPINIDir}} to {{ic|Location}}.
 +
 
 +
However, this will make the update daemon (see below) fail. You can work around this by passing a custom {{ic|php.ini}} file to php and using the {{ic|update_daemon2.php}} updater (update.php starts additional php instances and does not pass on the php config file). The following systemd unit file will accomplish that (replace "mysqld.service" with your appropriate SQL service):
 +
 
 +
  [Unit]
 +
  Description=Tiny tiny rss feed updater daemon
 +
  After=network.target mysqld.service
 +
 
 +
  [Service]
 +
  ExecStart=/usr/bin/php -c /etc/webapps/tt-rss/php.ini /usr/share/webapps/tt-rss/update_daemon2.php --quiet
 +
  User=http
 +
  StandardOutput=syslog
 +
 
 +
  [Install]
 +
  WantedBy=multi-user.target
 +
 
 +
Finally, in your (custom or system) {{ic|php.ini}} file you'll need to enable several extensions. Uncomment the following:
  
* * * * * sudo -u http /usr/bin/php -c /etc/webapps/tt-rss/php.ini /usr/share/webapps/tt-rss/update.php -feeds &>/var/log/tt-rss.log
+
  extension=curl.so
 +
  extension=iconv.so
 +
  extension=mysql.so
 +
  extension=posix.so
 +
  extension=soap.so
  
 
===Set up config.php===
 
===Set up config.php===
Line 42: Line 72:
 
See http://tt-rss.org/redmine/projects/tt-rss/wiki/UpdatingFeeds – but you should be able to simply
 
See http://tt-rss.org/redmine/projects/tt-rss/wiki/UpdatingFeeds – but you should be able to simply
  
  # systemctl enable tt-rss-updated
+
  # systemctl enable tt-rss
  
 
Do  
 
Do  
  
  $ systemctl status tt-rss-updated
+
  $ systemctl status tt-rss
  
 
to check that it's running fine.
 
to check that it's running fine.

Revision as of 02:22, 17 June 2013

Tiny Tiny RSS is an open source web-based news feed (RSS/Atom) aggregator, designed to allow you to read news from any location, while feeling as close to a real desktop application as possible.

Installation

Install tt-rss from the official repositories.

Set up database

You'll need to set up a database, either MySQL or postgresql. Create a user and database, e.g. with mysql:

$ mysql -p -u root
mysql> CREATE USER 'ttrss'@'localhost' IDENTIFIED BY 'somepassword';
mysql> CREATE DATABASE ttrss;
mysql> GRANT ALL PRIVILEGES ON ttrss.* TO "ttrss"@"localhost" IDENTIFIED BY 'somepassword';

Then create the initial tables:

mysql --user=ttrss --host=localhost --password=somepassword ttrss < /usr/share/webapps/tt-rss/schema/ttrss_schema_mysql.sql

Set up web server and php

tt-rss requires that the value of open_basedir is "none". You can set this /etc/php/php.ini (then sudo systemctl restart httpd).

tt-rss is installed into /usr/share/webapps/tt-rss/; you'll need to make this directory available from your web server. The simplest way is to do

# ln -s /usr/share/webapps/tt-rss /srv/http/tt-rss 

Custom php.ini and Closing basedirs for non-tt-rss webapps

[note: update_daemon2.php has been changed and no longer passes on the php.ini config specified by -c. This will not work until that is fixed.]

If you want the php open_basedir setting to only apply to the tt-rss location, you can create a custom php config file for tt-rss. Copy your /etc/php/php.ini file to /etc/webapps/tt-rss/php.ini and edit open_basedir and any other options specific to tt-rss. Then add to your apache config:

<Location /tt-rss/>
      PHPINIDir /etc/webapps/tt-rss 
</Location>
or your apache vitural host config:

<VirtualHost *:80>
      ...
      PHPINIDir /etc/webapps/tt-rss 
</VirtualHost>

Note: the VirtualHost solution is tested and working, users have reported issues adding PHPINIDir to Location.

However, this will make the update daemon (see below) fail. You can work around this by passing a custom php.ini file to php and using the update_daemon2.php updater (update.php starts additional php instances and does not pass on the php config file). The following systemd unit file will accomplish that (replace "mysqld.service" with your appropriate SQL service):

 [Unit]
 Description=Tiny tiny rss feed updater daemon
 After=network.target mysqld.service
 
 [Service]
 ExecStart=/usr/bin/php -c /etc/webapps/tt-rss/php.ini /usr/share/webapps/tt-rss/update_daemon2.php --quiet
 User=http
 StandardOutput=syslog
 
 [Install]
 WantedBy=multi-user.target

Finally, in your (custom or system) php.ini file you'll need to enable several extensions. Uncomment the following:

 extension=curl.so
 extension=iconv.so
 extension=mysql.so
 extension=posix.so
 extension=soap.so

Set up config.php

Copy /etc/webapps/tt-rss/config.php-dist to /etc/webapps/tt-rss/config.php. Fill in your database server info and other necessary parameters. Make sure your web-server is allowed to read /etc/webapps/tt-rss/config.php or else you will just see a blank page.

Set up an update daemon

See http://tt-rss.org/redmine/projects/tt-rss/wiki/UpdatingFeeds – but you should be able to simply

# systemctl enable tt-rss

Do

$ systemctl status tt-rss

to check that it's running fine.