Install

Prerequisites

  • PHP
    • php version 5.4 or higher
    • sessions enabled
    • memory limit at 1GB or more
    • minimum execution time of 60+ seconds
    • make sure you update the php.ini for both web and cli
    • php register_globals off
    • php5-curl library installed
    • php_openssl library installed (if connecting to SSL usenet provider or using spotnab)
  • GD Imaging Library w/PHP integration
  • PEAR
  • MySQL
    • max_allowed_packet = 12582912
    • group_concat_max_len = 8192
    • timezone set to php’s
  • Apache
    • script timeout of at least 60 seconds
    • mod_rewrite enabled
    • AllowOverride All set in conf to allow .htaccess to specify rewrite rules
  • 3rd Party API Keys (recommended to get your own api keys)
  • Deep RAR Password Inspection
    • unrar version 3.9 or higher
  • Thumbnailing and Media Info (if deep rar inspection is enabled)
    • ffmpeg
    • mediainfo

Installation

  1. Unzip/svn checkout the code into a folder in your web directory. do NOT move directories around.
  2. Create your website/vhost in apache and point to the /www/ directory.
  3. Browse to http://yournewznabserver/install.
  4. Once installed activate only one or two groups to test with first, this will save you time if it is not working correctly.
  5. Run the update_binaries.php and update_releases.php scripts in miscupdate_scriptsvia command-line.
  6. If updating was successful then you can continue to setup your site and configure the update scripts for auto-updating. windows users use the script /misc/update_scripts/win_scripts/runme.bat linux users use the /misc/update_scripts/nix_scripts/newznab_screen.sh

Updating

  1. Run svn update or in windows (using tortoisesvn) right mouse button the folder and click SVN Update
  2. Run any new patches since your last update by executing the script /misc/update_scripts/update_database_version.php
  3. Delete contents of cached smarty files in /www/lib/smarty/templates_c/*

Running Outside of Web Root

Set /.htaccess RewriteBase to your virtual directory

Sample Apache VirtualHost File

Add this to your existing VHOST file modifying your values for ServerName, Server Alias, and DocumentRoot. You should find this under /etc/apache2/sites-enabled/ (000-default):

<VirtualHost *:80>
    <Directory /var/www/newznab/htdocs/www/>
        Options FollowSymLinks
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>

    ServerAdmin admin@example.com
    ServerName example.com
    ServerAlias www.example.com
    DocumentRoot /var/www/newznab/htdocs/www
    LogLevel warn
    ServerSignature Off
</VirtualHost>