Newznab Installation Tutorial for Mac OSX

Got a program that plays well with SABnzbd? Share it here!
drummer1785
Newbie
Newbie
Posts: 6
Joined: December 24th, 2012, 12:09 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by drummer1785 »

Well shit, I'm impatient so I replaced my nzb_import.rb file in my nnplus1 folder with the original code with sudo left in there and it still said permission denied. I'm stuck again.
Ouboet
Newbie
Newbie
Posts: 5
Joined: December 18th, 2012, 8:27 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by Ouboet »

drummer1785 wrote: I also don't know where to find the nab_import.rb file you've talked about.
Hi Drummer. I used the code as listed by De5 in Textwrangler, changed the required lines and then saved as nzb_import.rb in the nnplus1 folder. Then in terminal cd to nnplus1 folder followed by ./nzb_import.rb import

I got a message in terminal " beginning import", so we will see: keep fingers crossed!
As far as all your other error messages: Got the same, was not sure what to do with them. For the moment, I have ignored them...
;-)
drummer1785
Newbie
Newbie
Posts: 6
Joined: December 24th, 2012, 12:09 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by drummer1785 »

de5perate, or anybody, whenever I cd to the nnplus1 folder and then try to do the ./nzb_import.rb command I get this in return:

-bash: ./nzb_import.rb: Permission denied

Any ideas on what's going on? I've tried changing the permissions to every folder and subfolder and I've googled the hell out of it but can't figure it out. I tried

sudo ./nzb_import.rb

as well, then it asked me for a password and I entered my username's password and that didn't work either, it came back with this:

sudo: ./nzb_import.rb: command not found

I have the nzb_import.rb file in my nnplus1 folder and I changed the username to mine in the "IMPORTPATH" line. Is there something I'm missing?
drummer1785
Newbie
Newbie
Posts: 6
Joined: December 24th, 2012, 12:09 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by drummer1785 »

I may have wrote that a little prematurely. I originally copy/pasted de5perate's nzb_import.rb file into textedit and then saved it and altered the file name to end with ".rb". I re-did it but this time with textwrangler and it seemed to work. I got the "beginning import..." response so hopefully it's going.
brendalee
Newbie
Newbie
Posts: 11
Joined: August 14th, 2012, 1:02 am

Re: Newznab Installation Tutorial for Mac OSX

Post by brendalee »

resolved..
Last edited by brendalee on December 26th, 2012, 11:36 pm, edited 1 time in total.
rpwhat
Newbie
Newbie
Posts: 1
Joined: December 26th, 2012, 12:15 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by rpwhat »

Great tutorial! Although i have this error when populating the groups when running the scripts - any ideas? Terminal error below -

Warning: implode(): Invalid arguments passed in /Applications/XAMPP/xamppfiles/htdocs/nnplus/www/lib/nntp.php on line 261
Received 0 articles of 100000 requested, 0 blacklisted, 0 not binaries
Server did not return 100000 article(s).
0 new, 0 updated, 0 parts. 126.71 headers, 0.97 update, 127.67 range.
Getting 100000 parts (4060645 in queue)
Error Failed to read from socket...!: Unexpected response: 'Overview Information Follows [COMPRESS=GZIP]'
Skipping group
StrongOne
Newbie
Newbie
Posts: 5
Joined: November 26th, 2012, 4:10 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by StrongOne »

Anyone have any info on how to set up Usenet Setting (newznab+), particularly how to change retention days.
drummer1785
Newbie
Newbie
Posts: 6
Joined: December 24th, 2012, 12:09 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by drummer1785 »

bwhocking wrote:

NOTES:
-Don't add to much at once bit by bit work better (I have stuffed this up).
-Stop normal updates while doing this (Update scripts mentioned earlier)
-Don't update to many at once I do one pernight expanding a week at a time

Open Terminal

Code: Select all

cd /Applications/xampp/xamppfiles/htdocs/nnplus/misc/update_scripts
then

Code: Select all

/applications/xampp/xamppfiles/bin/php-5.3.1 backfill.php
then

Run you normal update script

I know it's probably a stupid question, but how do I stop normal updates to do the backfill? And if we followed your other tutorial are the updates going to automatically happen, even after restarting the computer, or would I have to initiate it every time?
hellbent
Newbie
Newbie
Posts: 3
Joined: December 29th, 2012, 12:38 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by hellbent »

thanks so much for this thread!

has anyone had any luck with changing the default listening port? i want to run this on 8082 and can modifiy the httpd.conf file without issue but am having trouble with other site functions. for example, when in the movies section, if one were to select multiple releases and then download those nzbs, the site tries to package them up into a zip file and redirect the user but the port i specify in the httpd.conf file is ignored or not referenced and it just sends the user to port 80 (default) and fails. any ideas where to look???
De5perate
Newbie
Newbie
Posts: 12
Joined: December 15th, 2012, 9:05 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by De5perate »

StrongOne wrote:Anyone have any info on how to set up Usenet Setting (newznab+), particularly how to change retention days.
Everything you need should be found in the Edit Site section. You need to select Admin from the menu on the left if you are using the site as a user and then select Edit Site. In there you have a section titled Usenet Settings - there is a line titled Release Retention which you can directly modify (make sure you scroll to the bottom and click save settings before you exit).

There are other settings within the individual groups.
De5perate
Newbie
Newbie
Posts: 12
Joined: December 15th, 2012, 9:05 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by De5perate »

confusedxx wrote:What size HDD space do you need to run Newznab site and mysql db with 300 days of backfill on 12 groups? I am afraid that my hdd is too small. If it is, is there a way of adding an external Hdd that will be recognized where I can add the apps onto the external hdd?

It obviously depends on the number and size of the NZBs that are stored but I recently downloaded the dump from Newznab and that contains I believe 1000 days of nzbs for a large number of movie, TV, music and console newsgroups and they totalled less than 100GB zipped (and newznab does store the nzbs zipped) so I would guess that it would take max 200GB.

As far as using an external drive is concerned I can see no reason why not - you could simply move the whole XAMPP (assuming you used XAMPP) folder including all the newznab folders onto the external HDD and execute all the scripts from that location. I would be concerned at the speed of an external drive however as there is an awful lot of small files to process.

I haven't tried this so I could well be completely wrong but that's my thoughts for what its worth.
spazer
Newbie
Newbie
Posts: 2
Joined: September 11th, 2011, 5:47 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by spazer »

hellbent wrote:thanks so much for this thread!

has anyone had any luck with changing the default listening port? i want to run this on 8082 and can modifiy the httpd.conf file without issue but am having trouble with other site functions. for example, when in the movies section, if one were to select multiple releases and then download those nzbs, the site tries to package them up into a zip file and redirect the user but the port i specify in the httpd.conf file is ignored or not referenced and it just sends the user to port 80 (default) and fails. any ideas where to look???
I followed these instructions and it worked for me:
http://veerasundar.com/blog/2009/07/how ... rver-port/

only difference was the location of my httpd.conf file, which was located in:
/Applications/XAMPP/xamppfiles/etc/httpd.conf
brando56894
Newbie
Newbie
Posts: 27
Joined: April 29th, 2012, 4:34 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by brando56894 »

simonk83 wrote:Does anyone know if the _threaded scripts work on OSX? They're for Linux apparently but, you know, close enough :)
I just set up a Newznab server on my Arch Linux box and to make use or the multi-threaded update_binary you have to make sure that first your PHP interpreter was compiled with the pnctl flag (or whatever it says when you try and run the binary but it fails) and you also have to enable the POSIX extension in php.ini, then it should work. I'm using it now and it's considerably faster than doing it serially. :)
hellbent
Newbie
Newbie
Posts: 3
Joined: December 29th, 2012, 12:38 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by hellbent »

i tried running the threaded update on my mini this weekend and while it seemed to run fine i was unconvinced and switched back to the standard. my guess is that it was NOT working because when i switched back this morning i was getting new content again.

anyone figure out the best way to automate running the screen and the newznab_local.sh from within at startup on a Mac? i was able to find info on how to auto start XAMPP and that's working fine.
Joshua1909
Newbie
Newbie
Posts: 1
Joined: January 2nd, 2013, 8:36 pm

Re: Newznab Installation Tutorial for Mac OSX

Post by Joshua1909 »

Hi,
I was looking how to automate the update script, and in the documentation on page 20 it has the following:
Screen or tmux
If you want to go the screen or tmux route, you’ll need to pick one and install it:
# Install screen...
sudo apt-get install -y screen
# ...or tmux
sudo apt-get install -y tmux
In the nix_scripts directory there is a useful script called newznab_screen.sh that runs
update_binaries.php and update_releases.php, in addition to a few other scripts, continuously
and automatically. First, we need to modify it however, so lets change dir and make a copy:
cd /var/www/newznab/misc/update_scripts/nix_scripts
cp newznab_screen.sh newznab_screen_local.sh
Now open newznab_screen_local.sh in a text editor and modify NEWZNAB_PATH near the top to point to our
installation path:
nano newznab_screen_local.sh
Set NEWZNAB_PATH:
20 Chapter 3. Guides
Newznab Documentation, Release 0.2.3-dev
export NEWZNAB_PATH="/var/www/newznab/misc/update_scripts"
Now we can run the script via screen:
screen sh newznab_screen_local.sh
You should see the script download headers for the groups that you have enabled and then run various stages that will
attempt to group and catalogue the headers. For now, just leave the script running and detach from screen by typing
cntl a d.


Basically it's just getting you to run the script in a "screen" session so the script will keep running (and it mentions that they run continually and automatically) even after you close the terminal window.
It does not, however, run on start-up. I'm running this from my CentOS server not my Mac, so I just did the following, but I'm sure it'd be pretty simple to adjust:

Code: Select all

vi /etc/rc.d/rc.local
add a line to start a new background screen session

Code: Select all

screen -S NZBUpdate -dmS /pathtoyourdirectory/misc/update_scripts/nix_scripts/./newznab_screen.sh
and for reference a couple of quick screen commands:

Code: Select all

screen -l  (lists your screen sessions, you should see one call NZBUpdate if it's started from the script above)
screen -r (to reconnect to a disconnected session)
ctrl + a d  (to detach from the screen session without killing it)
Cheers,
Josh
Post Reply