How to install SABznbd on a VPS running CentOS 6
Finding a detailed guide on how to install SABnzbd on CentOS 6 is not easy, so that’s why we decided to write this guide. We wrote this guide for newbies, therefore we assume that you’ve never used Linux *cough*, we mean GNU/Linux before. The guide assumes that you’re using CentOS 6 (64 bit) x86_64 and that you’re installing SABnzbd on a Virtual Private Server (VPS). Even if we wrote this guide with VPS’ in mind, it will work for local installations of CentOS as well. The main difference is that you don’t need PuTTY and you won’t have to use a text browser. Also, if you’re using Debian, Ubuntu or FreeBSD linux distributions, you can try the LaSi auto installation script here.
All of this seems very complicated, but you can potentially install it very quickly. We can install SABnzbd on a fresh install of CentOS on a VPS in under 4 minutes, as seen in the video immediately below. The steps would be difficult to follow just by looking at the video (as it’s too fast), but you can refer to it if you require any clarifications.
1) Once you’ve signed up with the VPS of your choice, you should receive an automated email with your server’s IP address and password. It’ll look something like below.
2) We’ll need to access the VPS via a terminal, therefore download PuTTY here (direct link) and run it. It should look like below. While in PuTTY, type in the IP address found in the email above. Type in the port number as specified in the email. Select “SSH” and push Open.
3) You should see something like below. Login as root and enter in the password found in the email.
Once you are logged in, you should see something like below.
4) Let’s check to see if you have SELinux installed. SELinux is a set of security policies. By default, it is installed in most CentOS releases, but your VPS provider may have disabled it (because it frustrates a lot of its clients). You can check to see if it installed by typing “sestatus”, if you see the following, it means that SELinux is installed and enabled.
sestatus SELinux status: enabled SELinuxfs mount: /selinux
However, if you see the following
sestatus -bash: sestatus: command not found
it means that SELinux is not installed. Therefore, you don’t need to disable it. However, please install the editor nano by following the instructions immediately below.
If SELinux is enabled, we need to disable it by editing a config file, but let’s install an easy to use text editor called “nano” because we don’t feel like explaining how to use the difficult to use “vi” text editor.
Type the following to install a text editor. Once it prompts you, type “y” to proceed.
yum install nano
If nano installed successfully, you should see something like below.
Installed: nano.x86_64 0:2.0.9-7.el6 Complete!
To disable SELinux, type the following
and you should see something like below
# This file controls the state of SELinux on the system. # SELINUX= can take one of these three values: # enforcing – SELinux security policy is enforced. # permissive – SELinux prints warnings instead of enforcing. # disabled – No SELinux policy is loaded. SELINUX=enforcing # SELINUXTYPE= can take one of these two values: # targeted – Targeted processes are protected, # mls – Multi Level Security protection. SELINUXTYPE=targeted
edit line 6, so that it says
push CTRL X to exit and push “y” to save
let’s reboot the server to see if it has been disabled
log back in and type sestatus and it should say disabled
sestatus SELinux status: disabled
5) To avoid possible frustrations, let’s disable the linux firewall. If you’re worried about security, don’t do this, but if you just want SABnzbd to work and you don’t want to mess with IP tables, permanently disable the firewall by typing the following commands one at a time.
service iptables save service iptables stop chkconfig iptables off
6) Let’s install the Extra Packages for Enterprise Linux (EPEL). EPEL is a free community based repository project from the Fedora team which provides high quality add-on software packages for Linux distribution including CentOS. If the link below to “epel-release” is dead, get the latest version here.
Let’s install the package
rpm -Uvh epel-release-6-8.noarch.rpm
7) Let’s install “par2cmdline” which is a parity archive tool. In short, this program allows SABnzbd to repair archives that have been corrupted or missing parts (which happens a lot with USENET files).
yum install par2cmdline
click “y” whenever prompted.
You should see the following if it was installed properly.
Installed: par2cmdline.x86_64 0:0.4.tbb.20100203-3.el6 Dependency Installed: tbb.x86_64 0:2.2-3.20090809.el6 Complete!
8) Let’s download “unrar” as SABnzbd needs it to be able to extract the RAR files found on USENET. If the link is dead, download the latest 64 bit version here.
To install “unrar”, type the following
rpm -Uvh unrar-4.2.3-1.el6.rf.x86_64.rpm
9) We’re finally ready to install SABnzbd. Let’s install the repository first, which will allow you to easily update SABnzbd to newer versions. To create the repo, type the following
Copy the text below and paste it in the terminal by right clicking in the terminal (it will paste automatically). Make sure that each line begins as below.To save, push CTRL + X then type “y” to save.
[SABnzbd] name=SABnzbd for RHEL 6 and clones - $basearch - Base baseurl=http://fedora-sabnzbd.dyndns.org/SABnzbd/RHEL-CentOS/6/ failovermethod=priority enabled=1 gpgcheck=0 [rpmfusion-nonfree-updates-testing] name=RPM Fusion for EL 6 - Nonfree - Test Updates baseurl=download1.rpmfusion.org/nonfree/el/updates/testing/6/ enabled=1 gpgcheck=1 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rpmfusion-nonfree-el-6
Install SABnzbd by typing the following
yum install SABnzbd
when prompted, type “y”
If SABnzbd installed properly, you should see something like below.
Installed: SABnzbd.noarch 0:0.7.11-1.el6 Dependency Installed: nc.x86_64 0:1.84-22.el6 pyOpenSSL.x86_64 0:0.10-2.el6 python-cheetah.x86_64 0:2.4.1-1.el6 python-markdown.noarch 0:2.0.1-3.1.el6 python-pygments.noarch 0:1.1.1-1.el6 python-setuptools.noarch 0:0.6.10-3.el6 python-yenc.x86_64 0:0.3-9.el6 Complete!
SABnzbd is now installed.
If you ever want to update SABnzbd in the future, type the following
yum update SABnzdb
Let’s do some clean up and updates all of the packages in the system.
yum clean all yum update
10) Start SABnzbd by typing
You should now see something like below. It looks a bit funny because you’re looking at a text only web browser called “Lynx”.
You can configure all of this later in the normal browser (it’ll be easier then), so just push the down arrow till you see “Start Wizard” then push “Enter”
You should now see the below screen. Let’s skip this. Scroll to the bottom and click “Next”. We can configure the USENET server details later in a real browser (that’s what we’re going to do).
Once you’ve clicked “Next”, you will get to the screen below. In the below screen, it’s very important to select “I want SABnzbd to be viewable by any pc on my network” so that you can access SABnzbd from your home computer. Type in a username and password (whatever you wish). Uncheck the button on “Launch my internet explorer with the SABnzbd page when the program starts.”. It is unnecessary since we’ll be using SABnzbd remotely (not on the VPS itself). Click “Next” when done.
You should now see something like below. There will be 3 URLs at the bottom of the terminal. Write down the 2nd and 3rd URL’s. The 1st URL is useless to us since it can only be accessed on the Local Arena Network (LAN) and we’ll be accessing it remotely. You can now exit the text browser by pushing CTRL + C.
Setup is now complete.
11) To start SABnzbd type the following
SABnzbd is now running. You should now see something like below
Open up your favorite web browser and type in the 2nd or 3rd URL you noted down before. They should all work except for the 1st one. The webpage will ask you for your login and password. Afterwards, you should see something like below.
Click on “Config” in the top left and select “General”. You should see something like below. Copy the “API Key” to your clipboard. You can configure your USENET server now (in “Servers”) if you haven’t already. If not done already, select a username and password (in “General”) so that other people can’t access your SABnzbd client.
12) SABnzbd is now installed, but if we leave it as is, we will have to start it up manually each time the server boots. To avoid avoid having do that, let’s set it up so that SABnzbd starts automatically as a “daemon” whenever the VPS boots. When a program runs as a daemon it means that it will run in the background, so you don’t see it. SABnzbd is already installed as a service under CentOS, so all that we have to do is enable it to autorun on boot.
Before we do that, we need to edit the following config file otherwise the SABnzbd service won’t run properly.
And you’ll see something like below
You need to make a few edits as reflected in the screen above.
a) next to “sabuser”, type in the name of your linux user name. Therefore, if you logged into your VPS as root, type root.
b) For the line that starts as config=, remove /user/ if you’re using root (as the sabnzbd.ini file is located at /root/.sabnzbd/sabnzbd.ini and not /user/root/.sabnzbd/sabnzbd.ini. If you logged in any user other than root in a), you can ignore step b) and don’t edit this line.
c) Paste the API Key that you copied before in SABnzbd and paste it to the right of apikey.
d) Type in your seleted SABnzbd username and password.
Save and exit (CTRL X then “y” to save)
13) To activate SABnzbd as a service, type what’s below. This will launch the “Text Mode Setup Utility”
and you should see the following screen
Select “System services” and enable SABnzbd as seen below (use the right arrow to enable) then push “Ok” then “quit”.
Reboot your system to see if the system will start SABnzbd automatically.
Your system should boot up within a few seconds. Once it has reboot, type the following to see if the SABnzbd process is running
If you see SABnzbd.py running as below, it means that it successful started as a service.
Also, if you can also type the following command. It will output the status of the SABnzbd service.
If all is well and it is running properly, you should get something like this
SABnzbd (pid 464) is running...
If you get an error or anything else, it probably means that you didn’t edit the /etc/sysconfig/SABnzbd config file correctly above.
Now try to access SABnzbd from your browser. You should be able to access SABnzbd from your home computer. That’s it! SABnzbd is now installed and it will always start automatically as a background process. If you have any comments or questions, please leave a comment below.