| 1 | NewsStats 0.1 (c) 2010 Thomas Hochstein <thh@inter.net> |
| 2 | |
| 3 | NewsStats is a software package for gathering statistical data live |
| 4 | from a Usenet feed and subsequent examination. |
| 5 | |
| 6 | This script package is free software; you can redistribute it and/or |
| 7 | modify it under the terms of the GNU Public License as published by |
| 8 | the Free Software Foundation. |
| 9 | |
| 10 | --------------------------------------------------------------------- |
| 11 | |
| 12 | INSTALLATION INSTRUCTIONS |
| 13 | |
| 14 | 1) Install the scripts |
| 15 | |
| 16 | * Download the current version of NewsStats from |
| 17 | <http://th-h.de/download/scripts.php>. |
| 18 | |
| 19 | * Untar it into a directory of your choice: |
| 20 | |
| 21 | # tar -xzf newsstats-nn.tar.gz |
| 22 | |
| 23 | Scripts in this path should be executable by the news user. |
| 24 | |
| 25 | 2) Configuration |
| 26 | |
| 27 | * Copy the sample configuration file newsstats.conf.sample to |
| 28 | newsstats.conf and modify it for your purposes: |
| 29 | |
| 30 | # cp newsstats.conf.sample newsstats.conf |
| 31 | # vim newsstats.conf |
| 32 | |
| 33 | a) Mandatory configuration options |
| 34 | |
| 35 | * DBDriver = mysql |
| 36 | Database driver used; currently only mysql is supported. |
| 37 | |
| 38 | * DBHost = localhost |
| 39 | The host your mysql server is running on. |
| 40 | |
| 41 | * DBUser = |
| 42 | The username to connect to the database server. |
| 43 | |
| 44 | * DBPw = |
| 45 | Matching password for your username. |
| 46 | |
| 47 | * DBDatabase = newsstats |
| 48 | Database name. |
| 49 | |
| 50 | NewsStats will use those credentials to connect to your mysql |
| 51 | installation. |
| 52 | |
| 53 | * DBTableRaw = raw_de |
| 54 | Table holding raw statistical data. |
| 55 | |
| 56 | * DBTableGrps = groups_de |
| 57 | Table holding data on postings per group. |
| 58 | |
| 59 | b) Optional configuration options |
| 60 | |
| 61 | * TLH = de |
| 62 | Limit examination to that top-level hierarchy. |
| 63 | |
| 64 | 3) Database (mysql) setup |
| 65 | |
| 66 | * Setup your database server with a username, password and |
| 67 | database matching the NewsStats configuration (see 2 a). |
| 68 | |
| 69 | * Start the installation script: |
| 70 | |
| 71 | # install/install.pl |
| 72 | |
| 73 | It will setup the necessary database tables and display some |
| 74 | information on the next steps. |
| 75 | |
| 76 | 4) Feed (INN) setup |
| 77 | |
| 78 | You have to setup an INN feed to feedlog.pl. |
| 79 | |
| 80 | * Edit your 'newsfeeds' file and insert something like |
| 81 | |
| 82 | ## gather statistics for NewsStats |
| 83 | newsstats! |
| 84 | :!*,de.* |
| 85 | :Tc,WmtfbsPNH,Ac:/path/to/feedlog.pl |
| 86 | |
| 87 | * You should only feed that hierarchy (those hierarchies ...) to |
| 88 | feedlog.pl you'll want to cover with your statistical |
| 89 | examination. It may be a good idea to setup different feeds (to |
| 90 | different databases ...) for different hierarchies. |
| 91 | |
| 92 | * Please double check that your path to feedlog.pl is correct and |
| 93 | feedlog.pl can be executed by the news user |
| 94 | |
| 95 | * Check your 'newsfeeds' syntax: |
| 96 | |
| 97 | # ctlinnd checkfile |
| 98 | |
| 99 | * Reload 'newsfeeds': |
| 100 | |
| 101 | # ctlinnd reload newsfeeds 'Adding newsstats! feed' |
| 102 | |
| 103 | * Watch your 'news.notice' and 'errlog' files: |
| 104 | |
| 105 | # tail -f /var/log/news/news.notice |
| 106 | ... |
| 107 | # tail -f /var/log/news/errlog |
| 108 | |
| 109 | Everything should be going smoothly now. |
| 110 | |
| 111 | * If INN is spewing error messages to 'errlog' or reporting |
| 112 | continous respaws of feedlog.pl to 'news.notice', stop your feed: |
| 113 | |
| 114 | # ctlinnd drop 'newsstats!' |
| 115 | |
| 116 | and investigate. 'errlog' may be helpful here. |
| 117 | |
| 118 | * You can restart the feed with |
| 119 | |
| 120 | # ctlinnd begin 'newsstats!' |
| 121 | |
| 122 | later. |
| 123 | |
| 124 | You should be done now. |
| 125 | |
| 126 | Just have a look at your raw data (DBTableRaw). It should now start to |
| 127 | fill up. |
| 128 | |