NzbDrone on CentOS 6.5

I wanted to post something real fast that got NzbDrone up and running on my CentOS 6.5 Server. After some outstanding help today in the IRC channel, I was able to get this up and running without issue in Cent. Make sure that you have a compiler installed:

yum install gcc-c++ gcc

First things first, we’ll need to install the EPEL distro:

rpm -Uvh http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm

Next install mediainfo and gettext:

yum install mediainfo gettext -y

Markus101 recommended that SQLite 3 be version 3.8.x.x+. Since the installed version on Cent is 3.6, we need to rip it out and replace it. Note here that I completely ripped out sqlite3 via RPM which will throw yum into dependency hell for all the relies on it. I haven’t taken the time to figure out how to best configure this with alternatives or another route, but this will get your NzbDrone online.

rpm -e --nodeps sqlite

Now, check and make sure it’s gone:

rpm -qa | grep sqlite

cd /var/tmp

Download SQLite3 Autoconf build:

http://www.sqlite.org/2014/sqlite-autoconf-3080403.tar.gz

tar xvzf sqlite-autoconf-3080403.tar.gz

cd sqlite-autoconf-3080403

Run the following configure with environment variables set. This will enable column and table metadata in SQLite:

env ADDITIONAL_CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA" ./configure --prefix=/usr CFLAGS="-DSQLITE_ENABLE_COLUMN_METADATA"

make && make install

echo /usr/lib > /etc/ld.so.conf.d/sqlite3.conf

ldconfig

sqlite3 --version

You’ll want to grab the latest version on Mono from source. I installed 3.4.0 and it worked brilliantly.

cd /var/tmp

wget http://download.mono-project.com/sources/mono/mono-3.4.0.tar.bz2

bunzip2 mono-3.4.0.tar.bz2

tar xvf mono-3.4.0.tar

cd mono-3.4.0

In this download there is a missing file that will cause Mono to build incorrectly. Open the following file:

vi mcs/tools/xbuild/targets/Microsoft.Portable.Common.targets

make sure it reads:

write/quit the file, and head back to the mono directory:

cd /var/tmp/mono-3.4.0

./configure

make && make install

Once this is installed, download the Mono release of NzbDrone:

cd /var/tmp

wget http://update.nzbdrone.com/v2/master/mono/NzbDrone.master.2.0.0.1397.mono.tar.gz

tar xvzf NzbDrone.master.2.0.0.1397.mono.tar.gz

mv ./NzbDrone /opt

cd /opt/NzbDrone

mono --debug NzbDrone.exe

This should build the database and startup NzbDrone on port 8989.

Leave comments for suggestions or updates. Thank you Markus101 and maximus for your help today! Enjoy!

Thanks for the instructions.

I used your instructions to create as a starting point and created a wiki entry on the nzbdrone github page for CentOS installation.

Instead of replacing the system sqlite installation you can install the new version in a different path as long as you reference it correctly when you start nzbdrone.

I also created a centos init script (linked in the wiki) or you can access it here

Cool I was just going to mention this should be added to the wiki no doubt this will come in handy for someone else

Thanks to @inkjet2000 also for the helpful advice the more we can build the wiki up the more it will help out users :smile:

I wrote the service script that’s used to startup nzbdrone automatically on centos since none of the available ones would work - most people use ubunutu or a variation of it anyway but i wanted something that works for my use-case.

One problem i noticed was the restart from within nzbdrone doesnt work correctly. It’s caused by the fact that i’m using a different version of sqlite and mono than they system version which i’m passing to the startup script, the web client doesn’t know this and attempts to use the system version of sqlite which is too old.

I don’t see this getting fixed as it’s a low priority item, not a big deal since i don’t see myself having to restart it from the web interface too often. Just a heads up if anyone runs into this thread.

Example:

Script Startup:

export LD_LIBRARY_PATH=/opt/mono/lib:/opt/sqlite3.8.5/lib   && \
export PATH=/opt/mono/bin:/opt/sqlite3.8.5/bin:$PATH        && \
/opt/mono/bin/mono /opt/nzbdrone/NzbDrone.exe 

NZB Drone web restart:

mono /opt/nzbdrone/NzbDrone.exe --restart --nobrowser