summaryrefslogtreecommitdiff
path: root/www/php-tt-rss/MESSAGE
blob: 9da319c9bedac0a614424f1307b604e3070c0aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
===========================================================================
$NetBSD: MESSAGE,v 1.6 2017/04/05 12:33:49 fhajny Exp $

To use php-tt-rss with nginx 1.6 and php 5.4, you will need to perform
the following steps.

1. Install www/nginx and www/php-fpm.

2. Install PostgreSQL database server.

	# cd databases/postgresql93-server
	# make install

3. Start PostgreSQL server.

	# ${RCD_SCRIPTS_DIR}/pgsql start

4. Add PostgreSQL user, ttrss

	$ createuser -d -U pgsql ttrss

5. Set password for ttrss user

	$ psql -U pgsql template1
	psql (9.3.4)
	Type "help" for help.

	template1=# alter user ttrss with password 'ttrss_user_password';
	ALTER ROLE
	template1=# \q

6. Create database for ttrss, ttrss_db

	$ createdb ttrss_db -O ttrss -U ttrss

7. Check created database

	$ psql -U pgsql -l
                          List of databases
   Name    | Owner | Encoding  | Collate | Ctype | Access privileges
-----------+-------+-----------+---------+-------+-------------------
(snip)
 ttrss_db  | ttrss | SQL_ASCII | C       | C     |

8. Initialize database

	$ psql -U ttrss -d ttrss_db -p 5432 -f \
		${PREFIX}/share/tt-rss/schema/ttrss_schema_pgsql.sql

9. Be sure to have the following lines in ${PREFIX}/etc/php.ini.

	extension=iconv.so
	extension=json.so
	extension=mbstring.so
	extension=pgsql.so

10. Be sure to have the following in ${PREFIX}/etc/php-fpm.conf

	listen.allowed_clients = 127.0.0.1

11. Be sure to have the following lines in ${PREFIX}/etc/nginx/nginx.conf

	http {
	upstream php-handler {
		server 127.0.0.1:9000;
	}

	server {
		listen 80;
		root ${PREFIX}/share/tt-rss;
		server_name YOUR_SERVER_NAME;

		location ~ \..*/.*\.php$ {return 404;}

		location ~* ^/(.*\.php)$ {
			try_files $uri $uri/ index.php;

			include fastcgi_params;
			fastcgi_index index.php;
			fastcgi_param SCRIPT_FILENAME $document_root$1;
			fastcgi_param PATH_INFO $2;
			fastcgi_pass php-handler;
	}
	}


12. Edit ${PREFIX}/share/tt-rss/config.php, be sure to have the following
   lines.

	define('DB_TYPE', "pgsql");
        define('DB_HOST', "localhost");
        define('DB_USER', "ttrss");
        define('DB_NAME', "ttrss_db");
        define('DB_PASS', "ttrss_user_password");
	define('SELF_URL_PATH', 'http://localhost/');

13. Start PHP-FPM daemon.

	${RCD_SCRIPTS_DIR}/php_fpm start

14. Start nginx httpd server.

	${RCD_SCRIPTS_DIR}/nginx start

15. Access http://localhost/ , and login with
    login/password = "admin"/"password".
===========================================================================