A step-by-step guide of installing tt-rss on CentOS 5.7

Howtos, instructions and links to related software. Do not ask questions here.
lazycai
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 14 Nov 2011, 18:29

A step-by-step guide of installing tt-rss on CentOS 5.7

Postby lazycai » 14 Nov 2011, 18:39

I know it's really basic, but I think there are quite a number of inexperienced people like me who really need a detailed installation guide - the official guide on the wiki and the Linux.com article really couldn't guide me well :-(

Anyway, here we go. The tut was first published on my wordpress blog: http://lazycai.wordpress.com/2011/11/08/ttrss-1-5-6-install/ (and there is a Chinese guide as well, if you are interested)

The following installation guide assumes you have not configured you LAMP environment, but has got a working yum repository.

OS: CentOS 5.7 (RHEL/Fedora equivalent)

1. Install MySQL, Apache and PHP

shell> yum install mysql mysql-server
shell> yum install httpd php php-common

You would need some php modules. I'm not sure what is required other than php-xmlrpc, so you might want to install all the common stuffs:

shell> yum install php-pear php-pdo php-mysql php-pgsql php-pecl-memcache php-gd php-mbstring php-mcrypt php-xml php-xmlrpc

2. Start services

shell> service mysql start
shell> service httpd start

Do your security initialization if you haven't done it yet:

shell> /usr/bin/mysql_secure_installation

3. Download the latest version of tt-rss (which is v1.5.6 in this case)

shell> wget http://tt-rss.org/download/tt-rss-1.5.6.tar.gz

4. Unzip it

shell> tar -zxvf tt-rss-1.5.6.tar.gz -C /var/www/html

5. Create you database and user

First, enter you MySQL as root:

shell> mysql -u root -p

The password should have been setup upon initialization.

Create database:

mysql> CREATE DATABASE ttrssdb;

Create a user to access this database:

mysql> GRANT ALL ON ttrssdb.* TO ttrssuser IDENTIFIED BY "SomePassword";

And you are done here.

mysql> quit;

6. Create all the tables - with the script that came along with the source file!

shell> cd /var/www/html/tt-rss

shell tt-rss> mysql -u ttrssuser -D ttrssdb -p < schema/ttrss_schema_mysql.sql

7. Configuration file

shell tt-rss> cp config.php-dist config.php
shell tt-rss> vi config.php

There are several things you need to specify:

define('DB_TYPE', "mysql");
define('DB_HOST', "localhost");
define('DB_USER', "ttrssuser");
define('DB_NAME', "ttrssdb");
define('DB_PASS', "SomePassword");
define('SELF_URL_PATH', 'http://your.domain.com/tt-rss');

Make sure your password is correct or you'll get Connection Failed warnings.

And there is one more thing, which you'll find at the end of all pages:

define('ISCONFIGURED', false);
// Please set this to true if you have read everything above and
// finished setting configuration options.

(Well, I was stuck here for one whole night...)

8. Test it

Run an auto-check in your web browser:

your.domain.com/tt-rss/sanity_check.php

There might be some permission issues with the "icons" directory, which could be resolved by

shell tt-rss> chmod -R 777 icons

Now we can already see our pages showing up, but you can't see any contents yet. One last step to go:

9. Update feeds

You'll need to update feeds at the background, so setup a screen first:

shell tt-rss> screen -S updaterss

(Do a yum install screen if you haven't got it)

Under this screen, do

shell tt-rss> php ./update.php -daemon

if you are under single-user mode, or

shell tt-rss> php ./update_daemon2.php

if you are under multi-user mode.

And now you can detach from the screen with CTRL+A+D shortcut.

Now go to your.domain/tt-rss/ to try it out!
Last edited by lazycai on 16 Nov 2011, 06:40, edited 1 time in total.

Usul
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 23 Jul 2008, 10:36

Re: A step-by-step guide of installing tt-rss

Postby Usul » 15 Nov 2011, 18:02

If you target "inexperienced people", you should mention the distribution you use, since yum is not the package manager of every distribution. Do you use Fedora or RedHat?

Second, running the update daemon manually in a screen may work, but is not a permanent solution. Why not explaining to setup a proper daemon with an init script, automatically started on boot? It's not that hard.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: A step-by-step guide of installing tt-rss

Postby fox » 15 Nov 2011, 18:29

Second, running the update daemon manually in a screen may work, but is not a permanent solution.


FWIW, I've been doing this for like 5 years now. :)

Usul
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 23 Jul 2008, 10:36

Re: A step-by-step guide of installing tt-rss

Postby Usul » 15 Nov 2011, 18:38

fox wrote:
Second, running the update daemon manually in a screen may work, but is not a permanent solution.


FWIW, I've been doing this for like 5 years now. :)


Is there any reason for that? Since I'm using tt-rss, my tt-rss-script in init.d works very well.

Maybe I was more motivated to deploy a better solution because I restart my server every day ;)

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: A step-by-step guide of installing tt-rss

Postby fox » 15 Nov 2011, 19:24

Is there any reason for that?


Debugging. :)

Maybe I was more motivated to deploy a better solution because I restart my server every day


Restart?

19:25:09 up 278 days, 3:17, 2 users, load average: 0,00, 0,02, 0,01

Usul
Bear Rating Trainee
Bear Rating Trainee
Posts: 38
Joined: 23 Jul 2008, 10:36

Re: A step-by-step guide of installing tt-rss

Postby Usul » 15 Nov 2011, 23:21

My "server" is an old spare box behind my desk running debian, hosting mails, files, printers, some web services like a wiki - and tt-rss. There is no need to consume electricity and transform it to heat all night long.

lazycai
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 14 Nov 2011, 18:29

Re: A step-by-step guide of installing tt-rss

Postby lazycai » 16 Nov 2011, 06:39

Usul wrote:If you target "inexperienced people", you should mention the distribution you use, since yum is not the package manager of every distribution. Do you use Fedora or RedHat?

Second, running the update daemon manually in a screen may work, but is not a permanent solution. Why not explaining to setup a proper daemon with an init script, automatically started on boot? It's not that hard.

oops, I forgot to mention that it's CentOS 5.7

lazycai
Bear Rating Trainee
Bear Rating Trainee
Posts: 5
Joined: 14 Nov 2011, 18:29

Re: A step-by-step guide of installing tt-rss

Postby lazycai » 16 Nov 2011, 06:42

Usul wrote:My "server" is an old spare box behind my desk running debian, hosting mails, files, printers, some web services like a wiki - and tt-rss. There is no need to consume electricity and transform it to heat all night long.

It doesn't seem a good idea to restart a working server everyday...
Screen seems a solution good enough for a stable server :D

stormwatch
Bear Rating Trainee
Bear Rating Trainee
Posts: 13
Joined: 21 Mar 2013, 04:38

Re: A step-by-step guide of installing tt-rss on CentOS 5.7

Postby stormwatch » 21 Mar 2013, 06:01

No mention of selinux? I had to relabel tt-rss:

chcon -Rv -t httpd_sys_rw_content_t ttrss <my-tt-rss-directory>


It's probably overkill since you should relabel only the directories to be written to like cache and so but I am lazy.

And if you want changes to be permanenet (ie. not to have them relabeled by a restorecon) use semanage instead.

pmcdonnell
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 03 Mar 2014, 19:25

Re: A step-by-step guide of installing tt-rss on CentOS 5.7

Postby pmcdonnell » 03 Mar 2014, 19:27

stormwatch wrote:No mention of selinux? I had to relabel tt-rss:

chcon -Rv -t httpd_sys_rw_content_t ttrss <my-tt-rss-directory>


It's probably overkill since you should relabel only the directories to be written to like cache and so but I am lazy.

And if you want changes to be permanenet (ie. not to have them relabeled by a restorecon) use semanage instead.


Thank you so much for this! I spent a while trying to figure out why tt rss couldn't write. I knew it was selinux related somehow and I wanted to fix it rather than just disabling selinux like to many articles suggested.
I have more to learn about selinux obviously, but this has helped me out!

User avatar
sleeper_service
Bear Rating Overlord
Bear Rating Overlord
Posts: 884
Joined: 30 Mar 2013, 23:50
Location: Dallas, Texas

Re: A step-by-step guide of installing tt-rss on CentOS 5.7

Postby sleeper_service » 03 Mar 2014, 19:40

stormwatch wrote:No mention of selinux? I had to relabel tt-rss:

selinux is an abomination upon the land.


Return to “Knowledge Base”

Who is online

Users browsing this forum: No registered users and 1 guest