Debian server for newsgroups (couch, sick, nzbget) // XBMC

Discussion in 'Debian' started by salouma, Jan 28, 2014.

  1. salouma

    salouma Member

    Joined:
    Jan 24, 2014
    Messages:
    49
    Likes Received:
    2
    Hello everybody,

    I just bought the UDOO, it's a great hardware.
    I wanted to do a HTPC with server function (nzbget, couchpotato, sickbeard, headphones) and with a HTPC capability (XBMC)

    I started to work on a debian distro without GUI for stability.
    It worked pretty well so i wanted to share to the community. Maybe together we could simplify some steps of the installation and fix some minors problems.

    So like i said i wanted server function + XBMC. Now i'm not able to do it on the same installation. So i did two installation, one installation of Debian and server fuction like i will describe here and this installation will boot on hard disk. The second installation is the binary from stephan on a bootable sd card and the hard disk will be a device.
    So we need 2 sd card (one 1GB and one 4 to 8 GB) to have the two function. To switch to one to another you just change the SD card and reboot UDOO.

    Here i describe how i get the server function on a bootable hard disk. I recommand you nzbget instead of sabnzbd for better performance

    One problem i still have to fix is that i can't have NZBget autolunch... if someone could help ?

    Code:
    // download minimal image for UDOO (debian distro)
    
    http://www.udoo.org/forum/viewtopic.php?f=19&t=251
    
    // write image on your HD
    
    sudo dd bs=1M if=<YOUR PATH to quadminimal.img> of=/dev/<your device>
    
    // repare boot
    
    https://dl.dropboxusercontent.com/u/86313544/udoo-quad-3.0.35-gdfb7761-dirty.tgz
    
    Uzip the file
    Copy uimage to boot directory (you will need to do it as ROOT, you can "sudo nemo" for this)
    Copy the 3.0.35-gdfb7761-dirty directory in lib/modules
    
    
    // create ext4 partition for file storage
    Gparted to create ext4 partition using the rest of your hard drive
    
    // make the HD boot
    
    see topic http://www.udoo.org/forum/viewtopic.php?f=14&t=706
    
    // prepare dependances in UDOO ; start UDOO and login ROOT with SSH (password = minimal)
    sudo apt-get upgrade
    sudo apt-get update
    apt-get install ntp gcc unrar-free unar build-essential libxml2-dev pkg-config ncurses.h libncurses5-dev libsigc++-2.0-dev libpar2-0-dev openssl libssl-dev python python-cheetah git locales patch
    dpkg-reconfigure locales //select langage by space and then press enter
    
    // Auto mount hard disk partition in a directory (here /media/DD)
    mkdir <your directory> // example mkdir /media/DD
    fdisk -l //find your storage partition
    blkid //find your UUID
    mount /dev/<your hd> <your directory>  //example mount /dev/sda2 /media/DD
    nano /etc/fstab // add this line "
    UUID="yourUUID" <YOUR DESTINATION> ext4 defaults 1 2  / example UUID="cb711dad-ec03-4c5b-8045-907692f6a941" /media/DD ext4 defaults 1 2
    // mount -a or reboot to see if your HD is correctly monted in your target directory
    
    // NZBget download 
    
    wget http://sourceforge.net/projects/nzbget/files/nzbget-12.0.tar.gz
    tar -zxf nzbget-12.0.tar.gz
    
    // install libpar + patch
    wget http://downloads.sourceforge.net/project/parchive/libpar2/0.2/libpar2-0.2.tar.gz
    tar xvf libpar2-0.2.tar.gz
    cd libpar2-0.2
    cp /home/minimal/nzbget-12.0/libpar2-0.2-*.patch .
    patch < libpar2-0.2-bugfixes.patch
    patch < libpar2-0.2-cancel.patch
    ./configure
    make
    make install
    
    // NZBget install
    cd /home/minimal/nzbget-12.0/
    ./configure
    make
    make install
    make install-conf
    cp nzbgetd /etc/init.d //copy startup script
    
    //Run in deamon
    nzbget -D
    // Your OK for NZBGET => http://yourlocalip:6789 nzbget / password tegbzn6789
    
    
    // If you want SABNZBD
    // installation SABNZBD
    
    // add sources
    
    nano /etc/apt/sources.list
    
    //add
    deb http://http.debian.net/debian wheezy main non-free
    deb http://http.debian.net/debian wheezy contrib
    // save
    
    sudo apt-get update
    sudo apt-get install sabnzbdplus
    
    // Sickbeard install
    git clone git://github.com/midgetspy/Sick-Beard.git my-sickbeard-install
    cd my-sickbeard-install
    python SickBeard.py
    //Autorun sickbeard : change ".sickbeard" with your directory
    cd .sickbeard
    sudo cp init.ubuntu /etc/init.d/sickbeard
    sudo chmod +x /etc/init.d/sickbeard
    sudo update-rc.d sickbeard defaults
    sudo nano /etc/default/sickbeard
    // edit with your parameter
    SB_USER=root
    SB_HOME=.sickbeard
    SB_DATA=.sickbeard/sickbeard_data
    SB_PIDFILE=.sickbeard/pid
    
    // Couchpotato install and autorun
    git clone https://github.com/RuudBurger/CouchPotatoServer.git
    cp CouchPotatoServer/init/ubuntu /etc/init.d/couchpotato
    nano /etc/init.d/couchpotato //change the PATH line and root as user
    chmod +x /etc/init.d/couchpotato
    update-rc.d couchpotato defaults
    
    // Headphones install and autorun
    git clone https://github.com/rembo10/headphones.git
    cd headphones
    cp init.ubuntu /etc/init.d/headphones
    chmod +x /etc/init.d/headphones
    sudo update-rc.d headphones defaults
    nano /etc/default/headphones
    //edit with your parameter like done with Sickbeard
    HP_USER=root
    HP_HOME=/home/minimal/headphones/
    HP_DATA=/home/minimal/headphones/headphones_data
    HP_PIDFILE=/home/minimal/headphones/pid
    
    
    Nb you also need unrar non free
    Code:
    echo "deb-src http://mirrordirector.raspbian.org/raspbian/ wheezy main contrib non-free rpi" | sudo tee -a /etc/apt/sources.list
    apt-get update
    apt-get build-dep unrar-nonfree
    apt-get source -b unrar-nonfree
    dpkg -i unrar_4.1.4-1_armhf.deb
    Nb 2 : For better stability, don't use Couchpotato and sickBeard scan forlder, use NZBtoMedia post script : https://github.com/clinton-hall/nzbToMedia
    Nb 3 : You can also update kernel
     

Share This Page