SABnzbd does a great job of easing the pain of leveraging Newzbin NZB files for liberating compressed multi-part binaries from Usenet. This short guide details the process of installing the latest version of SABnzbd on Ubuntu 7.10 Gutsy Gibbon. Although we'll rely on packages available in the official Ubuntu apt repositories for this how-to it's worth noting that if you're using either Debian Etch or an older release of Ubuntu that the install process is the same. Copy and paste these commands into a terminal for usenet.
Installing dependencies with apt-get
$ sudo apt-get install python2.5 python-cheetah python-cherrypy unzip par2 unrar python-yenc python-feedparser wget
Getting and installing SABnzbd from source
$ cd ~/
$ wget http://surfnet.dl.sourceforge.net/sourceforge/sabnzbd/SABnzbd-0.2.5.tar.gz
$ tar xfvz SABnzbd-0.2.5.tar.gz
$ cd SABnzbd-0.2.5/
$ sudo python setup.py install
Making working directories and moving things into place
Here we'll make a couple of directories in our home folder that SABnzbd can use to do it's work.
$ mkdir ~/usenet/complete/ -p
$ mkdir ~/usenet/session/
$ mkdir ~/usenet/watch/
We also need to copy the web interface templates from the source files we extracted
$ mv templates/ ~/usenet/
Final configuration
To finsh the setup lets copy and rename the SABnzbd.ini.sample configuration file in the source to the root of our home directory and edit it with nano.
$ mv SABnzbd.ini.sample ~/.sajavascript:void(0)bnzbd.ini
$ nano ~/.sabnzbd.ini
Here what your sabnzbd.ini may end up looking like:
__version__ = 016
[misc]
## host we should listen on, leave "" for localhost
host = ""
## port we should listen on
port = 8080
## username for the web-interface
username = ""
## password for the web-interface
password = ""
## web file dir for (custom) Cheetah templates and the default.css file
web_dir = "/path/to/usenet/templates"
## dir to put downloads to, won't be created automatically
download_dir = "/path/to/usenet/session"
## dir to put completed downloads to, won't be created automatically
complete_dir = "/path/to/usenet/complete"
## If specified, .nzbs fetched by postid (or added by the dirscanner) will
## be backed up to this readable/writeable dir
nzb_backup_dir = ""
## dir to store cache and cookie files, windows users should
## leave this at .
cache_dir = "/path/to/media/usenet/session"
## location of your log directory, "" to disable logging
log_dir = "/path/to/usenet/session"
## dirscan directory
## SABnzbd will consume everything in that dir
## while trying to add it to the queue
dirscan_dir = "/path/to/usenet/watch"
## Scheduling options
## Syntax: minute hour day action
## 1st argument must be 0-59 (minute)
## 2nd argument must be 0-24 (hour)
## 3rd argument must be 1-7 (day) or *
## 4th argument must be resume or pause
##
## e.g schedlines = 0 7 * pause, 0 21 * resume
## to pause SABnzbd at 7:00 and resume operation at 21:00
schedlines = ,
## default options for dirscan added items
## 0 = None
## 1 = +Repair
## 2 = +Unpack
## 3 = +Delete
dirscan_opts = 3
## Enable/disable filejoining
## 0 = Disabled
## 1 = Enabled
enable_filejoin = 1
## Enable/disable unraring
## 0 = Disabled
## 1 = Enabled
enable_unrar = 1
## Enable/disable unzipping
## 0 = Disabled
## 1 = Enabled
enable_unzip = 1
## Enable/disable periodic queue saving
## 0 = Disabled
## 1 = Enabled
## Enable this on unstable systems
enable_save = 1
## Enable/disable
## 0 = Disabled
## 1 = Enabled
## Enable to cleanup par2 files
## (only if verifiying/repairing succeded)
enable_par_cleanup = 1
## should we failover on yenc crc errors
## 0 = no
## 1 = yes
fail_on_crc = 0
## should we download to group folders?
## (i.e /my/download/dir/alt.bin.whatever/somepost/)
## 0 = no
## 1 = yes
create_group_folders = 0
## bandwith limit
## 0 == ignore
## Slowdown factor, try values between 0.01 and 1.0.
bandwith_limit = 0
## Cleanup List
## List of file_extensions that should be deleted
## Example: ".nfo," or ".nfo, .sfv"
cleanup_list = ,
## Only get articles from topmost collection
## Enable for less memory usage
## Disable for more efficient downloading
## 0 = Disabled
## 1 = Enabled
top_only = 1
## Automatically sort by average age
## 0 = No
## 1 = Yes
auto_sort = 0
## Send group command before requesting articles
## 0 = No
## 1 = Yes
send_group = 0
## Article cache limit
## 0 = Disable Cache
## -1 = Unlimited cache
## >0 = Maximum memory (in bytes) to use for cache
cache_limit = 0
## Umask to use for directories/files
umask = 755
[logging]
## max size of SABnzbd.log (in bytes)
max_log_size = 5242880
## how many backups of SABnzbd.log to keep around
log_backups = 5
## enable cherrypy logging
## 0 = no
## 1 = yes
enable_cherrypy_logging = 1
## Fill in your servers here
## If your server doesn't need password auth set
## username and password to ''
## fillserver field must be 0 for non-fillservers (>0 otherwise)
[servers]
[[server 0]]
host = news.ngroups.net
port = 119
username =
password =
connections = 8
fillserver = 0
# [[server 1]]
# host = news.myfillserver.com
# port = 119
# username = ""
# password = ""
# connections = 8
# fillserver = 1
## www.newzbin.com support
[newzbin]
username = "username"
password = "password"
## Place downloads into newzbin.com category folders
## 0 = No
## 1 = Root category only
## 2 = Root category + subcategory
create_category_folders = 0
Test drive
Lets try and start SABnzbd
$ SABnzbd.py -f ~/.sabnzbd.ini
Now navigate to http://localhost:8080/sabnzbd and you should reach the web interface. If you don't then take a look at the output on the terminal and see if SABnzbd is complaining about not being able to find some of the working directories, you may need to go back and double check the paths you set in the sabnzbd.ini
The final countdown
If everything went okay with the test drive shutdown SABnzbd and restart it with the -d switch:
$ SABnzbd.py -f ~/.sabnzbd.ini -d
This will set SABnzbd running in background daemon mode. You can now close your terminal window and SABnzbd will continue to run in the background until you shut it down from the web interface.
4 comments:
thanks for this....so simple, yet i had some trouble til i found your post
Thank you, sabnzbd was my favorite on the windows platform.U moved my server to linux and used hellanzb...
But stil missed the versatile web interface of sabnzb....until now.
Its working stable and fast on my 64 bit Ubuntu machine.
A realy good post. Worked in a few minutes :-)
Thanks a lot!
how can one change the user_agent sent by (cherrypi) the http RSS reader?
Post a Comment