How to install NZBGet from Source on Ubuntu

Discussion in 'Application Guides' started by xzKinGzxBuRnzx, Feb 6, 2014.

  1. xzKinGzxBuRnzx

    xzKinGzxBuRnzx The Feature Man

    Joined:
    Aug 9, 2008
    Messages:
    1,888
    Likes Received:
    1,194
    Location:
    Space
    Here is a quick and simple guide to get you going with NZBGet. For those of you that don't know NZBGet is a usenet client. Similar to that of SABnzbd only NZBGet is designed for performance. Thus making it perfect for low power systems.

    Please understand that you are doing this at your own risk. While these commands will get nzbget up and running, I cannot be held responsible if something goes terribly wrong. However, if this does happen I'm here to help.

    Lets begin!

    Install

    Simply open terminal or ssh into your Ubuntu machine to run these which will download NZBGet (including dependencies), compile, and install.

    Code:
    sudo apt-get install -y build-essential libncurses5-dev libssl-dev libxml2-dev git subversion unrar unzip p7zip-full
    
    Code:
    sudo svn co https://svn.code.sf.net/p/nzbget/code/trunk /opt/nzbget-svn
    cd /opt/nzbget-svn
    sudo touch configure
    sudo touch Makefile.in
    sudo touch config.h.in
    sudo ./configure --with-tlslib=OpenSSL
    sudo make
    sudo make install
    sudo make install-conf
    
    Hard part is over, now to get nzbget running automatically upon boot here is what you need to do.

    Code:
    sudo nano /etc/init/nzbget.conf
    
    Paste in the following then press CTRL + X then Y and finally enter. Feel free to edit the "setuid root" & "setgid root" lines with whatever user you wish to runas.

    Code:
    #description "NZBGet upstart script"
    #author "xzKinGzxBuRnzx @ Digiex.net"
    
    setuid nzbget
    setgid nzbget
    
    start on runlevel [2345]
    stop on runlevel [016]
    
    respawn
    
    script
    exec nzbget -D
    end script
    
    pre-stop script
    exec nzbget -Q
    end script
    
    Now to start NZBGet you simply run this command

    Code:
    sudo service nzbget start
    
    Thats it! You've successfully installed NZBGet! Open up a browser and go to http://127.0.0.1:6789/ you'll be asked for a password, use username nzbget and password tegbzn6789

    Update

    If you are looking to update NZBGet. Just run these commands.

    Note: Make sure NZBGet is not running before doing this.

    Code:
    sudo service nzbget stop
    cd /opt/nzbget-svn
    sudo svn update
    sudo ./configure --with-tlslib=OpenSSL
    sudo make
    sudo make install
    
    Remove

    If you ever needed or wanted to remove NZBGet completely then this is how to do so.

    Code:
    sudo rm -rf /opt/nzbget-svn
    sudo rm -rf /usr/local/share/nzbget
    sudo rm -rf /usr/local/share/doc/nzbget
    sudo rm /usr/local/bin/nzbget
    
    sudo apt-get remove --purge -y build-essential libncurses5-dev libssl-dev libxml2-dev git subversion unrar unzip p7zip-full
    sudo apt-get autoremove --purge -y
    
    sudo rm /etc/init/nzbget.conf
    
    Config

    The config file for nzbget is located at '/usr/local/etc/nzbget.conf'. You may edit it by using your normal text editor, nzbget webui or by running this command below.

    Code:
    sudo nano /usr/local/etc/nzbget.conf
    
    For additional information please refer to NZBGet Documentation
     
    Rick and InsaneNutter like this.

Share This Page