Installing SABnzbdPLUS on Ubuntu x86_64

SABnzbd+ Plush  

SABnzbd+ is working just fine…

The idea behind my mediacenter is ofcourse to store all my media at a single computer. I might add TV functionality to it, but that’s gonna cost me since the Cable supplier uses a Smartcard verification system, which requires special hardware. So, I’ll just download my media at first.Since downloading movies and music is legal, but uploading isn’t, the use of torrents isn’t exactly what I was looking for. I’ve been using Usenet for a while and I like it a lot: It’s quick, it offers the content I’m looking for and there is no need for uploading. So, it’s fully legal to fill up my mediacenter. (That is, in the Netherlands, at the moment of writing this post). The only downside of Usenet is that I need a USP: a Usenet Service Provider.

For downloading off usenet, special programs are required. I’m using SABnzbdPLUS. This program downloads automattically, repairs, unpacks everything and can be run in the background. It’s Open Source Software, written in Python. For Windows, a click-and-go package is available for free download. For my Ubuntu system, it took a little more work, but it’s a well spent 10 minutes to get it up and running.

Grab your package at SourceForge. Take a quick look at the README and find out the requirements. Now, install the packages and install them:
apt-get install python python-cherrypy python-cheetah python-elementtree python-yenc python-feedparser unrar unzip par2That should be it, really. Unzip the package and start the program:
python SABnzbd.pyWithin 5-10 seconds your web browser will start and show the user interface.
Use the “Help” button in the web-interface to be directed to the SABnzbd+ Wiki. If you encounter problems, take a look at the error log. It’s quite specific about what’s causing the error. Mostly, it’s a configuration error or a missing package.

  • Don’t know your server settings? The USP sent them to you. Most common Usernet port is 119.

To get SABnzbd+ to startup on boot was littlebit of a hassle. I figured out that the program could be run at background if the ini-file is set manually. I also edited the main program to prevent it from opening a browser on startup, since the optional --nobrowser didn’t work. Look for this line in SABnzbd.py :

launch_a_browser("http://%s:%s/sabnzbd" % (browserhost, cherryport))

and change it to look like this:

#launch_a_browser("http://%s:%s/sabnzbd" % (browserhost, cherryport))

  • Don’t forget, Python is specific about indents. So, make sure you keep the indents the way they were.

To get SABnzbd+ to run on boot, I created a single command to start the program. The weird part was that it wouldn’t start on boot! I added the program to my /etc/init.d/ and to the various /etc/rcx.d/ directories. Finally, I got it to work using the Gnome sessions manager. Here’s the script, called startsabnzbd:

#!/bin/sh
/home/jaap/sabnzbd/sabnzbd-0.3.0rc3/SABnzbd.py --nobrowser -d -f /home/jaap/.sabnzbd/sabnzbd.ini

After I added this script to the startup list in the Sessions manager, all was good.

 

Add to your favorites:
  • Digg
  • del.icio.us
  • Facebook
  • Google Bookmarks
  • Reddit
  • StumbleUpon

This entry was posted on Thursday, December 27th, 2007 at 12:50 and is filed under Blog, Commandline, Mediacenter, SABnzbd, Testing, Ubuntu, Unix general. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

13 Responses to “Installing SABnzbdPLUS on Ubuntu x86_64”

Sander December 28th, 2007 at 16:20

Beulbek / Jaap,

Good to hear it also works on x86_64.
Clever to put ‘python’ also into apt-get: just in case…

Is there a reason to leave out python-celementtree from the apt-get? It thought python-celementtree is also needed by SABnzbd?

Sander

Sander December 28th, 2007 at 18:23

With ‘-b0′ no browser is started. For example:

cd /home/sander/vette-bak/sabnzbd-0.3.0rc4
python SABnzbd.py -b0 -d

BTW: What happened to my earlier comment about package install?

Jaap January 1st, 2008 at 20:25

Hi Sander,

Your first comment got marked as SPAM by the Aksimet plugin. But it’s here now :)

As a comment on that: python-elementtree is mentioned in the original post, maybe you missed it?

I saw you pasted my line into the SABnzb+ forums, that is always good: the more people use it, the better ofcourse!

Sander January 2nd, 2008 at 00:14

Hi Jaap,

My post to the SABnzbd forum was on Dec 25 (and Dec 27), was before your post and thus alas without your invention of including ‘python’ itself in the apt-get.

I had based my installation on the information on http://sabnzbdplus.wiki.sourceforge.net/Install+Unix and some trial-and-error to find the correct package names (see ugly stuff below).
FYI: I was doing this trial-and-error on a virtual machine booted with a live Ubuntu, so no harm possible. ;-)

BTW: I couldn’t find par2cmdline, but apparantly it had been renamed to par2.

Anyway: This 3.0 install is so much easier than the original SABnzbd 2.5.0 on Ubuntu, see all the complexity on http://ubuntuforums.org/printthread.php?t=320475&pp=75 . The more people know about it, the better it is.

5 unzip sabnzbd-0.3.0rc4.zip
6 ll
7 cd sabnzbd-0.3.0rc4/
8 ll
9 python
10 python SABnzbd.py
11 sudo apt-get install cherrypy
12 sudo apt-get install CherryPy
13 sudo apt-get install python-cherrypy
14 echo “universe en multiverse opnemen in repository”
15 sudo apt-get install python-cherrypy
16 sudo apt-get install cheetah
17 sudo apt-get install python-cheetah
18 sudo apt-get install elementtree
19 sudo apt-get install python-elementtree
20 sudo apt-get install yenc
21 sudo apt-get install python-yenc
22 sudo apt-get install cElementTree
23 sudo apt-get install celementtree
24 sudo apt-get install python-celementtree
25 sudo apt-get install feedparser
26 sudo apt-get install python-feedparser
27 sudo apt-get install unrar
28 sudo apt-get install unzip
29 sudo apt-get install par2cmdline
30 ll
31 python SABnzbd.py

Jaap January 2nd, 2008 at 21:59

Hi Sander,

I went through the same steps, using which and apt-cache search to find packages. But hey, apt-get is smart enough to find out which packages have already been installed…

Besides that, I see you’re typing the sudo at all your lines. I always get tired of it and start with a nice sudo su. Don’t forget to hit CTRL+D afterwards…

Avi January 6th, 2008 at 02:09

Hi!

Great article. I would suggest you something though. Blur the names of your actual downloads in your article.

Just a thought.

Tnx for the article.

Avi January 6th, 2008 at 02:17

Also, did you try ‘daemonize’ to run it as a Unix daemon?

And how do I restart it (obviously, without having to restart my server?)

TNX!

Jaap January 6th, 2008 at 20:40

Hi Avi,

Thanks for your feedback. Yes, I did try to daemonize it, but if SABnzbd+ would startup, it kept on opening my browser. That’s why I altered the program.

As of your question about restarting SABnzbd+: There’s no real “stop” command, so you’ll have to kill it.

#:~$ ps x | grep "SABnzbd"
6284 ? Sl 13:18 /usr/bin/python -OO /mydir/sabnzbd/sabnzbd-0.3.0rc3/SABnzbd.py --nobrowser -d -f /mydir/.sabnzbd/sabnzbd.ini
7026 pts/0 S+ 0:00 grep SABnzbd
#:~$ kill -9 6284
#:~$

A little fiddling on the commandline taught me the following command:

kill -9 `ps x | egrep "SABnzbd" -m1| awk '{ print $1}'`

Now, SABnzbD will shutdown.

Oh, by the way: like your theme, had it for a while ago :) And, I altered the screenshot. Downloading is legal here, but no need to piss off the wrong people ofcourse.

PPS: If you like SABnzbd, maybe you also like my extension: attdownload.py. You can find it in the SABnzbd section of my download page.

Avi January 7th, 2008 at 08:59

Thank you for the response.

Your email script looks really cool, I’ll try it out asap.

I assume that to get it to download zipfiles too I must change “nzb” to “nzb, zip” or something? Please bear with me, I’m really n00bish when it comes to coding.

Also, I don’t really get how to make Sabnzbd run on startup. It doesn’t matter if it opens the browser, as long as it runs. Can you help me with this?

Tnx again.

Avi January 7th, 2008 at 09:00

Oh, and btw, I like your theme too.

I was looking to move my blog to another server, so I can have full control over my wordpress installation, but that will have to happen later.

Jaap January 7th, 2008 at 17:58

Manage SessionsStart SAB

Hi Avi,

To start a command at boot, you can add it to the list of startup items in the Gnome Session manager. What I did was create a startsabnzb command and add that to my list of startup items.

I didn’t try to change the email program to download zip files. Just didn’t need it. I suggest you just try it!

Avi January 10th, 2008 at 08:41

Yo Jaap,

I tried that, but it didn’t work for me. For whatever reason, SAB would not start up at all on boot.

But I already deleted that (I’m working with Ubuntu on VM’s, and I need space) and started anew with Ubuntu Server, which seems more lightweight and suits my needs better.

I’ll try to get SAB installed on Ubuntu Server and *hopefully* get it to run on startup, and try to access it via browser on different pc, and report back here.

Later m8

Leave a Reply