Update Readme.md

This commit is contained in:
DariusIII
2016-09-21 22:37:36 +02:00
parent 8778e70cdc
commit 939a612f69
+106 -89
View File
@@ -1,98 +1,115 @@
[![Code Climate](https://codeclimate.com/github/NNTmux/newznab-tmux/badges/gpa.svg)](https://codeclimate.com/github/NNTmux/newznab-tmux) [![Build Status](https://scrutinizer-ci.com/g/NNTmux/newznab-tmux/badges/build.png?b=dev)](https://scrutinizer-ci.com/g/NNTmux/newznab-tmux/build-status/dev) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/NNTmux/newznab-tmux/badges/quality-score.png?b=dev)](https://scrutinizer-ci.com/g/NNTmux/newznab-tmux/?branch=dev)
I have forked jonnyboys newznab-tmux as he and the dev team have moved to another project (https://github.com/nZEDb/nZEDb). I will try as much as i can to maintain and improve these tmux scripts, where possible and needed, as they are a valuable addendum to newznab+.
Support is given on irc.synirc.net #tmux channel.
I started adapting some of more interesting scripts from nZEDb, but they require tempering with newznab database, so use them at your own risk. By using newznab-tmux you will render your indexer incompatible with newznab (you can revert changes by forcing the svn checkout, it will replace the changed files. Newznab is not aware of the changes in database, so you are safe to leave them as they are). Scripts require PHP version >= 5.6.x and Python 2.7x or newer.
NNTmux automatically scans usenet, similar to the way google search bots scan the internet. It does this by collecting usenet headers and temporarily storing them in a database until they can be collated into posts/releases. It provides a web-based front-end providing search, browse, and programmable (API) functionality.
# Steps to have a working tmux install:
This project is a fork of the open source usenet indexer newznab plus: https://github.com/anth0/nnplus and open source nZEDb usenet indexer https://github.com/nZEDb/nZEDb
CD to the root of your newznab install, ie. cd /var/www/nntmux
Next steps are very important:
NNTmux improves upon the original design, implementing several new features including:
git init
git remote add origin https://github.com/NNTmux/newznab-tmux.git
git fetch
git reset --hard origin/your_wanted_branch, ie. git reset --hard origin/0.x
git checkout -t origin/your_wanted_branch, ie. git checkout -t origin/0.x
Schema for first database update is located in resources/db/schema/ folder. Import it to your database.
There is another file in that folder nntmux_fi_schema.sql, use that if you don't have any releases and users on your site, AKA, completely fresh install of newznab+.
BE WARNED: If you import this schema it WILL NUKE YOUR DATABASE.
If you are updating from latest newznab svn (aka tvmaze version), you need to rename back tvinfoID columns into rageid
(located in releases and user_series tables, maybe some more), before you import the schema.sql.
You need to chmod to 777 following folders now:
resources/*
resources/smarty/templates_c
nzbfiles/
You need to add an alias to your apache/nginx conf of your indexer:
Alias /covers /path/to/newznab/resources/covers
# Composer
Note: Newznab-tmux uses composer to install required libraries. Now is time to <a href="https://getcomposer.org/doc/00-intro.md#downloading-the-composer-executable" title="Composer web site">install Composer</a>.
Use the global method.
When you have downloaded and installed composer,
run "./tmux update nntmux" to install dependencies and create required
folders and autoloader for them, and to update your database.
# yEnc:
Note: You have 3 choices,
you can install simple_php_yenc_decode which offers the best performance,
installing yydecode, which offers good performance,
or using PHP (no install required) which is very slow.
You can change these at any time if you have issues with any of the 3.
simple_php_yenc_decode:
sudo apt-get install git
cd ~/
git clone https://github.com/kevinlekiller/simple_php_yenc_decode
cd simple_php_yenc_decode/
sh ubuntu.sh
cd ~/
rm -rf simple_php_yenc_decode/
yydecode:
cd ~/
mkdir -p yydecode
cd yydecode/
wget http://colocrossing.dl.sourceforge.net/project/yydecode/yydecode/0.2.10/yydecode-0.2.10.tar.gz
tar -xzf yydecode-0.2.10.tar.gz
cd yydecode-0.2.10/
./configure
make
sudo make install
make clean
cd ~/
rm -rf yydecode/
Note: After installing you can change the yEnc setting in tmux edit accordingly.
# Threaded Scripts:
Tmux comes with php threaded scripts, python scripts are still there, but are not used, and will be removed in future
# Table per group:
Tmux can now be used with TPG ported from nZEDb, you need to run lib/testing/DB/convert_to_tpg.php to convert binaries, parts and partrepair tables, after this you will be able to use
threaded releases.php
# Alternate NNTP provider:
Newznab-tmux has added support for dual NNTP providers, you need to edit the provided config.php.example in www folder.
# Sphinx support:
Newznab-tmux now comes with its own Sphinx support, ported from nZEDb. Installation readme is in misc/sphinxsearch folder.
This version of tmux has many core newznab files modified, use at your own risk.
Tmux is started by following command in cli, from tmux folder: php tmux-ui.php start. Tmux can be gracefuly stopped in similar manner php tmux-ui.php stop.
- Optional multi-threaded processing (header retrieval, release creation, post-processing etc)
- Advanced search features (name, subject, category, post-date etc)
- Intelligent local caching of metadata
- Optional sharing of comments with other NNTmux and newznab sites
- Optional tmux (terminal session multiplexing) engine that provides thread, database and performance monitoring
- Image and video samples
- SABnzbd/NZBGet integration (web, API and pause/resume)
- CouchPotato integration (web and API)
## Prerequisites
System Administration know-how. NNTmux is not plug-n-play software. Installation and operation requires a moderate amount of administration experience. NNTmux is designed and developed with GNU/Linux operating systems. Certain features are not available on other platforms. A competent Windows administrator should be able to run NNTmux on a Windows OS.
### Hardware
4GB RAM, 2 cores(threads) and 20GB disk space minimum.
If you wish to use more than 5 threads a quad core CPU is beneficial.
The overall speed of NNTmux is largely governed by performance of the database. As many of the database tables should be held within system RAM as possible. See Database Section below.
### Software
PHP 5.5+ (and various modules)
MySQL 5.5+ (Postgres is not supported)
Python 2.7 or 3.0 (and various modules)(Optional. Most useful on Windows.)
The installation guides have more detailed software requirements.
### Database
Most (if not all) distributions ship MySQL with a default configuration that will perform well on a Raspberry Pi. If you wish to store more that 500K releases, these default settings will quickly lead to poor performance. Expect this.
As a general rule of thumb the database will need a minimum of 1-2G buffer RAM for every million releases you intend to store. That RAM should be assigned to either of these two parameters:
- key_buffer_size (MyISAM)
- innodb_buffer_pool_size (InnoDB)
Use [mysqltuner.pl](http://mysqltuner.pl "MySQL tuner - Use it!") for recommendations for these and other important tuner parameters. Also refer to the nZEDb project's wiki page: https://github.com/nZEDb/nZEDb/wiki/Database-tuning. This is particularly important before you start any large imports or backfills.
MySQL is normally shipped using MyISAM tables by default. This is fine for running with one or a few threads and is a good way to start using NNTmux. You should migrate to the InnoDB table format if NNTmux is configured to use one of the following:
thread counts > 5
TPG (Table Per Group) mode
tmux mode
This conversion script is helpful:
misc/testing/DB/convert_mysql_tables.php
Before converting to InnoDB be sure to set:
innodb_file_per_table
<br>
## Installation
Follow nZEDb Ubuntu install guide, just replace nZEDb with nntmux:
https://github.com/nZEDb/nZEDb_Misc/blob/master/Guides/Installation/Ubuntu/Guide.md
### Support
Support is given on irc.synirc.net #tmux channel.
### Licenses
nZEDb is GPL v3. See /docs/LICENSE.txt for the full license.
Other licenses by various software used by nZEDb:
Git.php => MIT and GPL v3
Net_NNTP => W3C
PHPMailer => GNU Lesser General Public License
forkdaemon-php => Barracuda Networks, Inc.
getid3 => GPL v3
password_compat => Anthony Ferrara
rarinfo => Modified BSD
smarty => GNU Lesser General Public v2.1
AmazonProductAPI.php => Sameer Borate
GiantBombAPI.php => MIT
TMDb PHP API class => BSD
TVDB PHP API => Moinax
TVMaze PHP API => JPinkney
Zip file creation class => No license specified.
simple_html_dom.php => MIT
All external libraries will have their full licenses in their respectful folders.
Some licenses might have been missed in this document for various external software, they will be included in their respectful folders.