NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

darkager's avatar
darkager
Aspirant
Jan 19, 2013

HOWTO: Install Newznab on ReadyNAS

Hey guys,

I've spent the past couple weeks trying to piece together how to install this after NZBMatrix and Newzbin went down. Between vacation, being sick, and work, it's taken me some time to make some progress. HOWEVER, I got it installed and working tonight, but throughout my searches, I didn't see a whole lot of inquiries for running it on the ReadyNAS. I'll probably get around to writing a how-to anyway, but figured if there are people actively trying to figure it out, I'd put it together faster so you don't have to deal with some of the BS I did.

FYI, I'm running an Ultra 2 with 2x 3tb Seagate drives in Raid-1. I also upgraded the memory to 2gb. I can say that it's been running fine for the past couple hours, but that's the extent of my field testing so far. Stability/load report will come with time.

EDIT:

I threw together a text-based walk-through.

Applications used: WinSCP (http://winscp.net), PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html). Both can be downloaded from their respective home pages.

1. Install EnableRootSSH_1.0 (at bottom of page: http://www.readynas.com/?page_id=608) (reboot after install)
1.a. Your root login info will be Username: "root" Pass: whatever your base ReadyNAS Password is (by default: "netgear1")

2. Install Python2.7 (apparently I don't see any dependencies for this. I thought there were. Install this if you have it, I guess. If you're running newznab, you're probably running SABnzbd/Sickbeard anyway, which will require it later. Otherwise, it will cost ~$2 from readynasXtras) (http://www.readynas.com/forum/viewtopic.php?f=48&t=50691)
?. Install ffmpeg (costs money: http://www.readynas.com/forum/viewtopic.php?f=48&t=52993) (Newznab walkthroughs say you need this, but not 100% sure. I had it, so I installed it).

3. Install PRO-MysqlOn (http://www.readynas.com/forum/viewtopic.php?f=48&t=22853)

These steps have been added to relocate the MySQL Database(s), as it is originally located on the /dev/md0 partition, which is limited to 4gb. If you do not move it, when you reach capacity, your NAS will begin to seize up. I wasn't able to reboot my NAS via the frontview, nor resume any newznab activity. I'm sure more bad stuff went down, but that's just what I caught wind to.
THESE ARE IMPORTANT STEPS.


3.a. Shut down MySQL by going to the frontview, click Addons -> Installed, then un-check the MySQLON checkbox and click Save. This should turn the green light in the MySQLON to gray. If that doesn't seem to work, you can use PuTTY (or any other shell session) and execute this command: "/usr/bin/mysqladmin shutdown"
3.b. With WinSCP, create the path: /c/databases
3.c. With WinSCP, navigate to /var/lib/mysql
3.d. With WinSCP, select all files/folders, right-click and select "Duplicate..." and specify Target Remote Directory as "/c/databases/*.*"
3.e. With WinSCP, navigate to /etc/mysql
3.f. Open my.cnf
3.g. Change "datadir = /var/lib/mysql" to "datadir = /c/databases"
3.h. With WinSCP, navigate to /etc/frontview/addons/bin/MYSQLON
3.i. Open start.sh
3.j. Modify the text "--datadir=/var/lib/mysql" to the following: "--datadir=/c/databases" and save the file. This is essential, because otherwise when your system reboots, it will start MySQL with the old datadir. This is kinda a double-protection. I originally only had the my.cnf file modified and REMOVED this parameter, but I thought any future firmware update might reset the my.cnf file to default. I figure the best solution would be to do both...
3.k. Re-start MySQL by going to the frontview, click Addons -> Installed, then check the MySQLON checkbox and click Save. This should turn the grey light in the MySQLON to green.

4. Install PHP5 (Costs money: http://www.readynas.com/forum/viewtopic.php?f=48&t=52765)

5. Install PRO-PHPMyAdmin_2.5 (http://www.readynas.com/forum/viewtopic.php?f=48&t=22713) (or use a later version. This is one I found on the forums for free)
5.a. With WinSCP, navigate to /c/webroot/phpadm
5.b. Open file config.inc.php
5.c. Modify line "$cfg['Servers'][$i]['connect_type'] = 'tcp';" change 'tcp' to 'socket' (i.e. $cfg['Servers'][$i]['connect_type'] = 'socket';)

6. Reboot

7. With WinSCP, navigate to /etc/php5/cli/php.ini

8. Modify the following lines as follows:
8.a. max_execution_time = 120
8.b.1. Select your appropriate time code from: http://uk.php.net/manual/en/timezones.php (i.e. America/Phoenix)
8.b.2. date.timezone = YOURTIMECODE

9. With WinSCP, navigate to /etc/php/apache2/php.ini
9.a. Modify the following lines as appropriate:
9.a.1. memory_limit = -1 (I use memory_limit = 384MB)
9.a.2. max_execution_time = 120
9.a.3. date.timezone = YOURTIMECODE

10. Create path: /var/log/apache2/ (if you skip this, apache will not restart correctly and you won't be able to access the frontview.)

11. Create path: /c/webroot/newznab/

12. Unzip contents of newznab.rar into /c/webroot/newznab/

13.a. With WinSCP, navigate to /etc/frontview/apache
13.b. Open Virtual.conf
13.c. Find line "<VirtualHost _default_:80>" and change to "<VirtualHost *:80>"

14.a. With Winscp, navigate to /etc/frontview/apache/addons
14.b. Create newznab.conf file.
14.c. Paste the following contents to the file and save.
---------------------
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName localhost

DocumentRoot /c/webroot/newznab/www
ErrorLog /var/log/apache2/error.log
LogLevel warn

SSLEngine off

</VirtualHost>

alias "/newznab" "/c/webroot/newznab/www"
<Location "/newznab">
Options All
</Location>
---------------------

15. With PuTTY (or via any other Shell cmd), Restart apache via cmd: "apache-ssl -f /etc/frontview/apache/httpd.conf -k restart"

16.a. With WinSCP, navigate to /c/webroot/newznab/
16.b. Select "www" and "nzbfiles" directories.
16.c. Right-Click -> Properties
16.d. Under Permissions, set the Octal to 0777 and check "Set group, owner and permissions recursively", and hit OK.

17. With WinSCP, Navigate to /c/webroot/newznab/www/

18. Modify .htaccess file. All you're changing is the 2nd line: FROM "#RewriteBase /" TO "RewriteBase /newznab/" (yes, removing the #)

19. In your browser, navigate to http://<yourNASIP>/newznab/install/

20. Click "Go to Step one: Pre flight check"

21. All Status boxes should read "OK" -- Click "Go to step two: Set up the database"

22. For Username, type "root" and click "Setup Database" (leave password blank).

23. Click "Step three: Setup news server connection"

24. Enter your Usenet server information. Click OK (or whatever the button is at the bottom. should be pretty obvious)

25. Click "Cache Settings"

26. Select Caching type. I use None, simply because we are very limited on memory space and I'm not sure on the disk usage. Click "Save configuration file."

27. Click "Step five: Setup admin user"

28. Set up your admin user account. Pretty straight forward

29. Click "Step Seven: Set NZB File Path"

30. Configure NZB File path. I would suggest using default ("/c/webroot/newznab/nzbfiles/" for me)

31. Click "admin home page"

32. Read the instructions on the Admin homepage. Should help you out with the rest.

4 Replies

Replies have been turned off for this discussion
  • Thank you for the guide, just what i was looking for, and works great! :D
  • FYI TMiland, I ran into an SQL database size issue which kinda kills the NAS. I'm looking into relocating the MySQL database to the /c/ mount (it's on /dev/md0 which has a 4gb limit). I will have to do it tomorrow, though. I'll post back when I figure it out.
  • I edited the original walk-through to include steps to relocate the MySQL database to the /c/ mount. The steps are bolded, as I HIGHLY recommend doing them.
  • Steps are done! Thank you for telling me(us) :-) Great job on the walk-through!

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More