Koozali.org: home of the SME Server

SABnzbd

Offline si_blakely

  • *
  • 57
  • +0/-0
SABnzbd
« on: April 25, 2012, 12:52:33 PM »
SABnzbd is a Binary Usegroup (NZB) downloader with a large number of features. Because it requires a later version of Python than stock SME8b7, this is rather complex and requires a compiler to install some of the additional python modules.

Requires
Python2.6 with pyOpenSSL, Cheetah, yEnc, feedParse (requires GCC, openssl-devel to build)

Code: [Select]
yum install gcc gcc-c++ python-devel openssl-devel

From http://www.geekymedia.com/uncategorized/rhel5-centos5-rpms-for-python-2-5-and-2-6/ download
Code: [Select]
wget http://mirrors.geekymedia.com/centos/python26-2.6-geekymedia1.i386.rpm
wget http://mirrors.geekymedia.com/centos/python26-devel-2.6-geekymedia1.i386.rpm
wget http://mirrors.geekymedia.com/centos/python26-libs-2.6-geekymedia1.i386.rpm
wget http://mirrors.geekymedia.com/centos/python26-tools-2.6-geekymedia1.i386.rpm
wget http://mirrors.geekymedia.com/centos/tkinter26-2.6-geekymedia1.i386.rpm

yum localinstall python26*.rpm tkinter26*.rpm

python26 should now bring up the python 2.6 prompt. (ctrl-D to exit)

From http://www.cheetahtemplate.org/ download
Cheetah-v2.4.0.tar.gz
Code: [Select]
wget http://pypi.python.org/packages/source/C/Cheetah/Cheetah-2.4.4.tar.gz
tar zxf Cheetah-2.4.4.tar.gz
cd Cheetah-2.4.4
python26 setup.py install
cd ..

From https://launchpad.net/pyopenssl/ download
pyOpenSSL-0.11.tar.gz (pyOpenSSL-0.13 will not compile against SME OpenSSL install)
Code: [Select]
wget https://launchpad.net/pyopenssl/main/0.11/+download/pyOpenSSL-0.11.tar.gz
tar -xvf pyOpenSSL-0.11.tar.gz
cd pyOpenSSL-0.11
python26 setup.py build
python26 setup.py install
cd ..

From SABnzbd Sourceforge get yenc
Code: [Select]
wget http://sabnzbd.sourceforge.net/yenc-0.3.tar.gz
tar zxf yenc-0.3.tar.gz
cd yenc-0.3
python26 setup.py install   # Need to do this as admin
cd ..

Get feedparser from Googlecode
Code: [Select]
wget http://feedparser.googlecode.com/files/feedparser-4.1.zip
mkdir feedparser-4.1
cd feedparser-4.1
unzip ../feedparser-4.1.zip
python26 setup.py install   
cd ..

Download par2cmdline-0.4-12.el5.i386.rpm (rpmfind.net)
Code: [Select]
wget ftp://fr2.rpmfind.net/linux/epel/5/i386/par2cmdline-0.4-12.el5.i386.rpm
yum localinstall par2cmdline-0.4-12.el5.i386.rpm

Add fws and rpmforge repositories, install unrar
Code: [Select]
db yum_repositories set fws repository \
BaseURL http://repo.firewall-services.com/centos/\$releasever \
EnableGroups no GPGCheck yes \
Name "Firewall Services" \
GPGKey http://repo.firewall-services.com/RPM-GPG-KEY \
Visible yes status disabled

db yum_repositories set rpmforge repository \
Name 'Dag - EL5' \
BaseURL 'http://apt.sw.be/redhat/el5/en/$basearch/dag' \
EnableGroups no \
GPGCheck yes \
GPGKey http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt \
Visible no \
Exclude freetype,htop,iptraf,rsync,syslinux \
status disabled

signal-event yum-modify
yum install --enablerepo=rpmforge unrar

Create an ibay sabnzbd, this creates the user and group

Code: [Select]
wget http://sourceforge.net/projects/sabnzbdplus/files/sabnzbdplus/sabnzbd-0.6.15/SABnzbd-0.6.15-src.tar.gz/download
tar -xvf SABnzbd-0.6.15-src.tar.gz
mv SABnzbd-0.6.15 /opt/sabnzbd

mkdir /var/lib/sabnzbd
mv /opt/sabnzbd/admin /var/lib/sabnzbd/
mv /opt/sabnzbd/log /var/lib/sabnzbd/
mv /opt/sabnzbd/backup /var/lib/sabnzbd/
cp /opt/sabnzbd/sabnzbd.ini /var/lib/sabnzbd/
chown -R sabnzbd:sabnzbd /var/lib/sabnzbd

chmod a+x /opt/sabnzbd/SABnzbd.py
python26 -OO /opt/sabnzbd/SABnzbd.py -v

mkdir -p /var/service/sabnzbd
mkdir -p /var/service/sabnzbd/log

cd /var/service/sabnzbd
make file run containing
Code: [Select]
#!/bin/sh
exec 2>&1
exec setuidgid sabnzbd python26 /opt/sabnzbd/SABnzbd.py -b 0 -f /var/lib/sabnzbd/sabnzbd.ini -s 0.0.0.0:8080

Code: [Select]
cd /var/service/sabnzbd/log
make file run containing
Code: [Select]
#!/bin/sh
exec                                    \
    /usr/local/bin/setuidgid smelog     \
    /usr/local/bin/multilog t s5000000  \
    /var/log/sabnzbd

Code: [Select]
mkdir -p /var/log/sabnzbd

touch /var/service/sabnzbd/down

db configuration set sabnzbd service status enabled TCPPort 8080 access private

ln -s /var/service/sabnzbd /service/sabnzbd
ln -s /etc/rc.d/init.d/daemontools /etc/rc.d/init.d/supervise/sabnzbd
ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S98sabnzbd


chmod 755 /var/service/sabnzbd/run
chmod 755 /var/service/sabnzbd/log/run
chown smelog:smelog /var/log/sabnzbd

db accounts set sabnzbd ProxyPass
db accounts setprop sabnzbd Target http://localhost:8080/sabnzbd
db accounts setprop sabnzbd Description SABnzbd
db accounts setprop sabnzbd HTTP on
db accounts setprop sabnzbd HTTPS on
expand-template /etc/httpd/conf/httpd.conf
sv t httpd-e-smith


/sbin/e-smith/signal-event post-upgrade;  /sbin/e-smith/signal-event reboot

Then log in to Server:8080 and complete configuration (check out http://sabnzbd.org for a setup guide).
Once the wizard is complete you can use http://Server/sabnzbd to access.
I create an ibay MyDownloads for downloads and set a folder there as the Completed Download location with a permissions mask of 777. I also create a watch folder in that ibay for the Watched Folder. You need to tweak permissions in the ibay
Code: [Select]
chmod -R a+rw /home/e-smith/files/ibays/MyDownloads/files/
For the security conscious ...
Code: [Select]
yum remove gcc gcc-c++

Have fun

Offline SuperGrover

  • **
  • 56
  • +0/-0
Re: SABnzbd
« Reply #1 on: September 10, 2012, 10:09:15 PM »
Hi,

I've been trying to get SABnzbd installed, but I can't seem to exclude package zlib-1.2.3-7.el5.x86_64 from the installer (it's a depency of openssl-devel), because there's already a newer version installed.

Also the package gdbm-1.8.0-28.el5.x86_64 gives the same error
Code: [Select]
(which is newer than gdbm-1.8.0-26.2.1.el5_6.1.i386) is already installed


Anybody who did this install also, recently??

« Last Edit: September 10, 2012, 10:11:00 PM by SuperGrover »

Offline SuperGrover

  • **
  • 56
  • +0/-0
Re: SABnzbd
« Reply #2 on: September 10, 2012, 11:31:05 PM »
Forget it, I gave up with the x86_64 version, i386 works a little bit better, but now I'm stuck at the actual installation of SABnzbd.

Will try further tomorrow.....

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: SABnzbd
« Reply #3 on: September 11, 2012, 08:30:14 PM »
Please refrain from pasting howtos here, please use the section in the wiki. This makes maintaining and adding data to it a lot easier in the future, see http://wiki.contribs.org/Category:Howto
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)