Howto: Get SABnzbd+ working
Added by Kris K about 1 year ago
I do various kinds of consulting in Windows land, but wanted to give Nexenta a shot for my home file server to take advantage of all the features of ZFS, as well as just to try something different. I have little to no experience with Linux, and even less with Solaris, so feel free to laugh at how wrong my setup below is. Suggestions as to how to simplify or secure things are welcomed. Note that this box is on an internal network behind a firewall and used by exactly one person, so having an ultra-secure setup isn't my top priority. That said, I would prefer to do it right.
This is as much for me if I ever need to reinstall as it is for those who might want to do the same ;).
Supporting stuff:
- apt-get install python-cheetah
- apt-get install python-ssl
- apt-get install python-yenc
- apt-get install unzip
Unrar:
- wget http://www.rarlab.com/rar/unrar-sol-intel.gz (SAB complains that this is an unsupported vesion of unrar, but it works. Beats me.)
- gunzip unrar-sol-intel.gz
- chmod +x unrar-sol-intel
- mv unrar-sol-intel /us/bin/unrar
Par2cmdline:
- wget http://garr.dl.sourceforge.net/sourceforge/parchive/par2cmdline-0.4.ta.gz
- gunzip par2cmdline-0.4.tar.gz
- tar -xvf par2cmdline-0.4.tar
- cd par2cmdline-0.4
- vi ReedSolomon.cpp and execute :%s/^bool ReedSolomon/template <> bool ReedSolomon/g
- ./configure
- make
- make check
- make install
- cd ..
- mv /usr/local/bin/par2* /usr/bin/
SABnzbd+:
- wget http://switch.dl.sourceforge.net/sourceforge/sabnzbdplus/SABnzbd-0.5.3-src.tar.gz
- gunzip SABnzbd-0.5.3-src.tar.gz
- tar -xvf SABnzbd-0.5.3-src.tar
- mv SABnzbd-0.4.6 /opt/
- vi SABnzbd.py and modify the first line to #!/usr/bin/python2.5 -OO
Finally:
- python2.5 /opt/SABnzbd-0.5.3/SABnzbd.py -b0 -s 0.0.0.0:8085 --daemon
- Point a bowser at you Nexenta box, port 8085, and run the configuration wizard. You're set.
Sources:
- http://sabnzbd.wikidot.com/install-cc42
- http://web.vathorstweb.nl/index.php?option=com_content&task=view&id=78&Itemid=48
- http://leocharre.com/articles/installing-par2-par2cmdline-on-fedora-core-4/
- http://www.google.com
Replies
RE: Howto: Get SABnzbd+ working - Added by Anil Gulecha about 1 year ago
Thanks Kris!
I've added this to the main wiki page.
RE: Howto: Get SABnzbd+ working - Added by Paul Rae about 1 year ago
Excellent howto, but could be shortened slightly.
apt-get install python python-support python-cheetah python-configobj python-feedparser python-dbus python-yenc python-openssl unzip par2 unrar
wget http://switch.dl.sourceforge.net/sourceforge/sabnzbdplus/SABnzbd-0.5.3-src.tar.gz tar -zxvf SABnzbd-0.5.3-src.tar mv SABnzbd-0.4.6 /opt/
python /opt/SABnzbd-0.5.3/SABnzbd.py -b0 -s 0.0.0.0:8085 --daemon
Point a bowser at you Nexenta box, port 8085, and run the configuration wizard. You're set.
SAB will still complain about unrar as it prefers newer versions, however it will still work. I'm going to look at how to add a newer version of the package to nexenta's repo's.
RE: Howto: Get SABnzbd+ working - Added by Kris K about 1 year ago
Thanks, skipping all the nonsense with par2 and unrar would be welcome. I just wasn't sure if par2 and par2cmdline were the same thing, and the unrar complained at first so I tried the manual method... which still complained.
RE: Howto: Get SABnzbd+ working - Added by Apnar . about 1 year ago
A few other things that I did for sab to run it as its own user and add it to the services framework:
#
# link for easier upgrade later
ln -s /opt/SABnzbd-0.5.3 /opt/SABnzbd
# setup dedicated user
groupadd sabnzbd
useradd -g sabnzbd -c "SABnzbd User" -d /export/home/sabnzbd sabnzbd
mkdir -p /export/home/sabnzbd
chown -R sabnzbd:sabnzbd /export/home/sabnzbd
# Add SABnzbd to SMF - copy files attached to forum post to /tmp first
cp /tmp/sabnzbd /lib/svc/method/
chmod 755 /lib/svc/method/sabnzbd
svccfg import /tmp/sabnzbd-manifest.xml
svcadm enable sabnzbd
It runs well as its own user storing everything in the sabnzbd user's home directory. Makes upgrades much easier and adds a little bit of security.
-apnar
sabnzbd - Startup script for SABnzbd (820 Bytes)
sabnzbd-manifest.xml - Manifest to add SABnzbd to SMF (1.6 KB)
RE: Howto: Get SABnzbd+ working - Added by Kris K about 1 year ago
Many thanks, the service config thing was just the kind of thing I was looking for. Also, I modified your instructions/files and managed to get SickBeard running as a service as well :D
RE: Howto: Get SABnzbd+ working - Added by John W about 1 year ago
apnar,
Thanks for the direction to get sabnzbd running as a service, but I'm running into an issue where sabnzbd restarts itself every 30 seconds (I think?). Since there's no real GUI, I determined this after seeing some odd behavior in downloads and watching the PID change for the python process. Manually starting the program using the same command as the startup script and adding --daemon works fine however. Can you shed some light on what is happening with the restarts? I'd love to get all this up and running automatically.
Thanks
RE: Howto: Get SABnzbd+ working - Added by Apnar . about 1 year ago
John W wrote:
Can you shed some light on what is happening with the restarts? I'd love to get all this up and running automatically.
You can try running the start up script yourself, something like this:
#
svcadm disable sabnzbd
su - sabnzbd
/lib/svc/method/sabnzbd start
you said you tried to run the same command the startup script is using, but did you do it as the sabnzbd user? The manifest I provided automatically runs the service as the "sabnzbd" user.
Also you can check for logs from SAB, the location is configured during initial setup (you can check the log_dir param in your config file). My guess is it's a permissions issue somewhere.
-apnar
RE: Howto: Get SABnzbd+ working - Added by John W about 1 year ago
So apparently I was running the daemon as root with this '/opt/SABnzbd/SABnzbd.py -d -f /export/home/sabnzbd/sabnzbd.ini -b0 -s 0.0.0.0:8085 --daemon" so there were no permissions issues then. When I run as sabnzbd, I get the same restarting issue I had when the program ran from startup.
I dug into the logs, and it looks like I'm getting a long string of sqlite3 database errors. I think I've figured out what happened...
- ran as root while setting it up, root created root owned .db files in /export/home/sabnzbd/admin (.ini file pointed to sabnzbd's home)
- sabnzbd user had no access to these files and threw errors every time a database transaction was supposed to happen
I believe I have it working now after correcting the permission issues. Thanks for the help!
RE: Howto: Get SABnzbd+ working - Added by Ty Morton about 1 year ago
I am having problems getting the manifest to import. I receive the following error when I try am I missing something simple?
svccfg import /tmp/sabnzbd-manifest.xml
svccfg: document DTD unknown; not service bundle? #
Thanks Ty
RE: Howto: Get SABnzbd+ working - Added by Kris K about 1 year ago
You have to follow the link he posted, then save the document you get in the next step or so. You're getting the page that has the XML linked on it... not the XML itself.
RE: Howto: Get SABnzbd+ working - Added by Mairon C about 1 year ago
Thank you for the guide!
I'm having trouble with getting par2 (and unrar for that matter) from the repo's. I've tested both hardy-testing and hardy-unstable but can't find it. It seems it was available in elatte but not in hardy. Tried to compile it from source but I don't have the compiler tools installed it seems. I'm using NexentaStor v3.0.4 Community Edition btw.
Any help or tips would be greatly appreciated!
RE: Howto: Get SABnzbd+ working - Added by Bernard Voss 10 months ago
To get par2 working do the following: login using ssh as admin su to goto root permission then wget http://apt.nexenta.org/dists/hardy-unstable/contrib/binary-solaris-i386/contrib/utils/par20.4-10nexenta1solaris-i386.deb dpkg -i par20.4-10nexenta1solaris-i386.deb to do a manual download and install of par2.