Difference between revisions of "TT-RSS"

From ArchWiki
Jump to: navigation, search
(Set up web server and php)
m (indentation fix)
 
(45 intermediate revisions by 26 users not shown)
Line 1: Line 1:
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.
+
[[Category:News aggregators]]
 +
[[Category:Web applications]]
 +
[[ja:TT-RSS]]
 +
[https://tt-rss.org/ 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]]: https://aur.archlinux.org/packages/tt-rss/
+
Install {{pkg|tt-rss}} from the [[official repositories]].
  
===Set up database===
+
If you plan on using PostgreSQL, install {{pkg|php-pgsql}}
You'll need to set up a database, either [[mysql]] or [[postgresql]]. Create a user and database, e.g. with mysql:
+
 
 +
tt-rss is installed into {{ic|/usr/share/webapps/tt-rss/}}; you'll need to make this directory available from your web server. The simplest way is to do :
 +
 
 +
* With [[Apache HTTP Server]] :
 +
: {{bc|# ln -s /usr/share/webapps/tt-rss /srv/http/tt-rss}}
 +
 
 +
* With [[Nginx]] :
 +
: {{bc|# ln -s /usr/share/webapps/tt-rss /usr/share/nginx/html/tt-rss}}
 +
 
 +
===Set up php and 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 -p -u root
 
  mysql> CREATE USER 'ttrss'@'localhost' IDENTIFIED BY 'somepassword';
 
  mysql> CREATE USER 'ttrss'@'localhost' IDENTIFIED BY 'somepassword';
  mysql> CREATE DATABASE 'ttrss';
+
  mysql> CREATE DATABASE ttrss;
 
  mysql> GRANT ALL PRIVILEGES ON ttrss.* TO "ttrss"@"localhost" IDENTIFIED BY 'somepassword';
 
  mysql> GRANT ALL PRIVILEGES ON ttrss.* TO "ttrss"@"localhost" IDENTIFIED BY 'somepassword';
  
Then create the initial tables:
+
Or create a user and database in PostgreSQL, e.g.:
 +
 
 +
[postgres]$ createuser -P --interactive
 +
[postgres]$ createdb -U ttrss ttrss
  
mysql --user=ttrss --host=localhost --password=somepassword ttrss < /usr/share/webapps/tt-rss/schema/ttrss_schema_mysql.sql
+
In {{ic|/etc/php/php.ini}}, enable the following modules:
  
===Set up web server and php===
+
extension=curl
tt-rss requires that the value of open_basedir is "none". You can set this /etc/php/php.ini (then {{ic|sudo systemctl restart httpd}}).
+
extension=iconv
 +
extension=pdo_mysql # for MySQL
 +
extension=pdo_pgsql # for PostgreSQL
 +
extension=pgsql # for legacy PostgreSQL plugins
 +
extension=soap
  
tt-rss is installed into {{ic|/usr/share/webapps/tt-rss/}}; you'll need to make this directory available from your web server. The simplest way is to do
+
''If'' {{ic|open_basedir}} is set in {{ic|/etc/php/php.ini}} (it isn't by default), add {{ic|/var/lib/tt-rss}} to it.
  
$ sudo ln -s /usr/share/webapps/tt-rss /srv/http/tt-rss
+
Application initialization can be done either automatically or manually.
  
 +
Automatic way:
 +
* remove default config file {{ic|/etc/webapps/tt-rss/config.php}}, without this file tt-rss webapp enters installation wizard.
 +
* navigate to (your-servers-root)/tt-rss/ and proceed with the installer.
 +
* save generated config file to {{ic|/etc/webapps/tt-rss/config.php}}.
  
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}}:
+
Manual way:
 +
* edit tt-rss config file{{ic|/etc/webapps/tt-rss/config.php}} and update database settings.
 +
* re-create database from {{ic|/usr/share/webapps/tt-rss/schema/ttrss_schema_TYPE.sql}}. With MySQL run:
 +
$ mysql --user ttrss --password=<PASSWORD> ttrss < /usr/share/webapps/tt-rss/schema/ttrss_schema_mysql.sql
 +
 
 +
With PostgreSQL run:
 +
$ psql ttrss -U ttrss -f /usr/share/webapps/tt-rss/schema/ttrss_schema_pgsql.sql
 +
 
 +
===Pacman hook===
 +
To do tt-rss database upgrades automatically you may set up pacman post upgrade hook based on following example:
 +
 
 +
[Trigger]
 +
Operation = Install
 +
Operation = Upgrade
 +
Type = Package
 +
Target = tt-rss
 
   
 
   
  <Location /tt-rss/>
+
  [Action]
      php_admin_value open_basedir none
+
Description = Updating TT-RSS Database
</Location>
+
When = PostTransaction
 
+
Exec = /usr/bin/runuser -u http -- /usr/bin/php /usr/share/webapps/tt-rss/update.php --update-schema
However, this will make the update daemon (see below) fail. You could fix it by making your own daemon that uses its own php.ini file, ie. has this line:
 
  
ExecStart=/usr/bin/php -c /its/own/php.ini /usr/share/webapps/tt-rss/update.php -daemon
+
You need to put it into /etc/pacman.d/hooks/tt-rss.hook if you did not customize HookDir in pacman.conf.
  
===Set up config.php===
+
See also [[Pacman#Hooks]]
Copy {{ic|/etc/webapps/tt-rss/config.php-dist}} to {{ic|/etc/webapps/tt-rss/config.php}}. Fill in your database server info and other necessary parameters.
 
  
 
===Set up an update daemon===
 
===Set up an update daemon===
See http://tt-rss.org/redmine/projects/tt-rss/wiki/UpdatingFeeds – but you should be able to simply
+
See https://tt-rss.org/gitlab/fox/tt-rss/wikis/UpdatingFeeds – but you should be able to simply
  
  $ sudo 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.

Latest revision as of 16:05, 18 May 2018

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.

If you plan on using PostgreSQL, install php-pgsql

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
# ln -s /usr/share/webapps/tt-rss /usr/share/nginx/html/tt-rss

Set up php and 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';

Or create a user and database in PostgreSQL, e.g.:

[postgres]$ createuser -P --interactive
[postgres]$ createdb -U ttrss ttrss

In /etc/php/php.ini, enable the following modules:

extension=curl
extension=iconv
extension=pdo_mysql # for MySQL
extension=pdo_pgsql # for PostgreSQL
extension=pgsql # for legacy PostgreSQL plugins
extension=soap

If open_basedir is set in /etc/php/php.ini (it isn't by default), add /var/lib/tt-rss to it.

Application initialization can be done either automatically or manually.

Automatic way:

  • remove default config file /etc/webapps/tt-rss/config.php, without this file tt-rss webapp enters installation wizard.
  • navigate to (your-servers-root)/tt-rss/ and proceed with the installer.
  • save generated config file to /etc/webapps/tt-rss/config.php.

Manual way:

  • edit tt-rss config file/etc/webapps/tt-rss/config.php and update database settings.
  • re-create database from /usr/share/webapps/tt-rss/schema/ttrss_schema_TYPE.sql. With MySQL run:
$ mysql --user ttrss --password=<PASSWORD> ttrss < /usr/share/webapps/tt-rss/schema/ttrss_schema_mysql.sql

With PostgreSQL run:

$ psql ttrss -U ttrss -f /usr/share/webapps/tt-rss/schema/ttrss_schema_pgsql.sql

Pacman hook

To do tt-rss database upgrades automatically you may set up pacman post upgrade hook based on following example:

[Trigger]
Operation = Install
Operation = Upgrade
Type = Package
Target = tt-rss

[Action]
Description = Updating TT-RSS Database
When = PostTransaction
Exec = /usr/bin/runuser -u http -- /usr/bin/php /usr/share/webapps/tt-rss/update.php --update-schema

You need to put it into /etc/pacman.d/hooks/tt-rss.hook if you did not customize HookDir in pacman.conf.

See also Pacman#Hooks

Set up an update daemon

See https://tt-rss.org/gitlab/fox/tt-rss/wikis/UpdatingFeeds – but you should be able to simply

# systemctl enable tt-rss

Do

$ systemctl status tt-rss

to check that it's running fine.