CentOS6 Tiny Tiny RSS をインストールする

・環境

CentOS 6.4
Tiny Tiny RSS 1.9

・インストール

# yum install httpd php mysql-server

・追加モジュールのインストール

# yum install php-mysql php-xml php-mbstring

Tiny Tiny RSS のダウンロード

# cd /var/www/html
# git clone https://tt-rss.org/git/tt-rss.git tt-rss
# chown apache:apache tt-rss -R

・DB の作成

※DB名:tt-rss、DBユーザ名:tt-rss_user、DBユーザパスワード:tt-rss_password とする場合

# mysql -u root -p
mysql> CREATE USER 'tt-rss_user'@'localhost' IDENTIFIED BY 'tt-rss_password';
mysql> CREATE DATABASE tt-rss CHARACTER SET utf8;
mysql> GRANT ALL ON DB_NAME.* TO 'tt-rss_user'@'localhost';

スキーマのインストール

# cd /var/www/html/tt-rss/
# mysql tt-rss -u tt-rss_user -p < schema/tt-rss_schema_mysql.sql

・config の作成

# cp -a config.php-dist config.php

# vi config.php
※DB周りの設定を行う

RSS の設定

http://<サーバのIP>/tt-rss/

※初期ユーザは[admin]、パスワードは[password]
※右上の [Actions] -> [Preferences] から設定する
※何も表示されない場合は設定を間違えているので、
 apache の errorログを見て解決する

・feed の更新

# update.php --feeds

・cron の設定

# crontab -e

#!/bin/sh
*/30 * * * *    /usr/bin/php /var/www/html/tt-rss/update.php --feeds 1> /dev/null

・モバイル機器用画面設定
g2ttrss と ttrss-mobile の二つが公開されているので、好みの方をインストールする

g2ttrss-mobile

# cd /var/www/html/
# git clone https://github.com/g2ttrss/g2ttrss-mobile
# cd g2ttrss-mobile/
# cp -ar index.htm index.html
  ※Webサーバが index.htm を indexページと解釈しない設定の場合は index.html のファイルを用意
# vi js/g2tt-config.js
  global_ttrssUrl = "/tt-rss/";
  ※Webサーバのドキュメントルートから見て tt-rss ディレクトリへのパスを記載する

・tt-rss の設定で「API アクセスを有効にする」にチェックを入れる

・g2ttrss-mobile にアクセス
 http://<サーバのIP>/g2ttrss-mobile/

  デフォルトの表示設定の変更方法は https://github.com/g2ttrss/g2ttrss-mobile の
  Configuration Options を確認する

ttrss-mobile

# cd /var/www/html/
# git clone https://github.com/mboinet/ttrss-mobile.git
# cd ttrss-mobile/scripts/
# cp conf.js-dist conf.js

# vi conf.js
※必要に応じて apiPath を修正する。
 tt-rss と ttrss-mobile が同じディレクトリにある場合は修正不要。

・tt-rss の設定で「API アクセスを有効にする」にチェックを入れる

・ttrss-mobile にアクセス
 http://<サーバのIP>/ttrss-mobile/