Difference between revisions of "TT-RSS"

From ArchWiki
Jump to: navigation, search
m
m (Remove PostgreSQL database initialization from the example)
 
(23 intermediate revisions by 17 users not shown)
Line 1: Line 1:
[[Category:Internet Applications]]
+
[[Category:Internet applications]]
 
[[ja:TT-RSS]]
 
[[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===
+
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 :
You'll need to set up a database, either [[mysql]] or [[postgresql]]. Create a user and database, e.g. with mysql:
+
 
 +
- With [[Apache HTTP Server]] :
 +
 
 +
# ln -s /usr/share/webapps/tt-rss /srv/http/tt-rss
 +
 
 +
- With [[Nginx]] :
 +
 
 +
# 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
Line 14: Line 26:
 
  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.:
 
 
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 {{ic|sudo systemctl restart httpd}}).
 
 
 
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
 
 
 
# ln -s /usr/share/webapps/tt-rss /srv/http/tt-rss
 
  
====Custom php.ini and Closing basedirs for non-tt-rss webapps====
+
[postgres]$ createuser -P --interactive
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:
+
[postgres]$ createdb -U ttrss ttrss
  
<Location /tt-rss/>
+
You also need to add some paths to {{ic|/etc/php/php.ini}} (starting with PHP 7.0 it is [https://www.archlinux.org/news/php-70-packages-released/ unset by default], so no change is required):
      PHPINIDir /etc/webapps/tt-rss
 
</Location>
 
  
  or your apache vitural host config:
+
  ...
+
  open_basedir = ... :/usr/share/webapps/:/etc/webapps/:/var/lib/tt-rss
  <VirtualHost *:80>
+
  ...
      ...
 
      PHPINIDir /etc/webapps/tt-rss  
 
  </VirtualHost>
 
  
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:
+
In the same file, enable the following modules:
  
  [Unit]
+
extension=curl.so
  Description=Tiny tiny rss feed updater daemon
+
extension=iconv.so
  After=network.target
+
extension=mysqli.so # extension=pdo_mysql.so might be an alternative
 
+
extension=soap.so
  [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:
+
Application initialization can be done either automatically or manually.
  
  extension=curl.so
+
Automatic way:
  extension=iconv.so
+
* remove default config file {{ic|/etc/webapps/tt-rss/config.php}}, without this file tt-rss webapp enters installation wizard.
  extension=mysql.so
+
* navigate to (your-servers-root)/tt-rss/ and proceed with the installer.
  extension=posix.so
+
* save generated config file to {{ic|/etc/webapps/tt-rss/config.php}}.
  extension=soap.so
 
  
===Set up config.php===
+
Manual way:
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.
+
* edit tt-rss config file{{ic|/etc/webapps/tt-rss/config.php}} and update database settings.
Make sure your web-server is allowed to read {{ic|/etc/webapps/tt-rss/config.php}} or else you will just see a blank page.
+
* 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
  
 
===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
  
  # 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 07:11, 11 April 2017

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.

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 :

- With Apache HTTP Server :

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

- With Nginx :

# 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

You also need to add some paths to /etc/php/php.ini (starting with PHP 7.0 it is unset by default, so no change is required):

...
open_basedir = ... :/usr/share/webapps/:/etc/webapps/:/var/lib/tt-rss
...

In the same file, enable the following modules:

extension=curl.so
extension=iconv.so
extension=mysqli.so # extension=pdo_mysql.so might be an alternative
extension=soap.so

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

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.