Handelingen

Sonarr

Uit WaaaghPedia

Installatie

Voorbereiding

Installeer CentOS en Finetune CentOS

yum -y install epel-release #Install EPEL repo
yum -y install wget git par2cmdline p7zip unzip tar gcc python-feedparser python-configobj python-dbus python-devel libmediainfo python-pip #Install Prereqs
yum -y install https://www.rpmfind.net/linux/rpmfusion/nonfree/el/updates/7/x86_64/u/unrar-5.4.5-1.el7.x86_64.rpm   #Install unrar
yum -y install ftp://rpmfind.net/linux/fedora/linux/releases/22/Everything/x86_64/os/Packages/p/python-yenc-0.4.0-4.fc22.x86_64.rpm #Install python-yenc
pip install pip --upgrade   #Update pip
pip install cheetah cryptography sabyenc --upgrade   #install python modules
yum -y update && reboot

Installatie

useradd -r sonarr # Create usenet service account
nano /etc/yum.repos.d/mono.repo   # Create mono repo
---
[mono]
name=mono for Centos 7 - Base
baseurl=http://download.mono-project.com/repo/centos/
failovermethod=priority
enabled=1
gpgcheck=0
---

rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"   # GPG key for mono repo
yum -y install mediainfo libzen libmediainfo curl gettext mono-core mono-devel mono-locale-extras sqlite   # Additional pre-reqs for Sonarr
mkdir -p /apps/{data/.sonarr,sonarr} && cd /apps   # Create data dir for Sonarr
wget http://download.sonarr.tv/v2/master/mono/NzbDrone.master.tar.gz   # Download Sonarr files
tar -xvf NzbDrone.master.tar.gz   # Extract Sonarr (NzbDrone) files
mv NzbDrone/* sonarr/. && rm -rf NzbDrone*   # Move to sonarr folder, and cleanup after the download
chown -R sonarr:sonarr /apps   # Change ownership of Sonarr files
nano /etc/systemd/system/sonarr.service   # Create systemd service script file
---
[Unit]
Description=Sonarr Daemon
After=syslog.target network.target

[Service]
Type=simple
User=sonarr
Group=sonarr
ExecStart=/usr/bin/mono /apps/sonarr/NzbDrone.exe /data=/apps/data/.sonarr
Restart=always
RestartSec=15
TimeoutStopSec=20

[Install]
WantedBy=multi-user.target
---

ln -s /usr/lib64/libMonoPosixHelper.so /usr/lib/libMonoPosixHelper.so
systemctl enable sonarr.service   # Set Sonarr to start at system boot
systemctl start sonarr.service   # Start Sonarr 

Sonarr is nu geinstalleerd en beschikbaar op http://hostname:8989

Updaten

Update je systeem

pip install pip --upgrade   #Update pip
cd /apps
systemctl stop sonarr #stop sonarr
rm -rf sonarr-bu #Verwijder backup
mv sonarr sonarr-bu #verplaats huidige versie naar backup locatie
wget http://update.sonarr.tv/v2/master/mono/NzbDrone.master.tar.gz
tar -xvzf NzbDrone.master.tar.gz
mkdir sonarr
mv NzbDrone/* sonarr/. 
rm -rf NzbDrone*   #Move to sonarr folder, and cleanup after the download
chown -R sonarr:sonarr /apps   #Change ownership of Sonarr files
systemctl start sonarr

Opt

Firewall

firewall-cmd --zone=public --add-port=8989/tcp --permanent
firewall-cmd --reload

Nas Koppeling

Mount NFS

MediaInfo

yum -y install libmediainfo

Bronnen

Sonarr Firewall deviant.engineer