mirror of
https://github.com/Sonarr/Sonarr
synced 2025-03-11 22:53:19 +00:00
Fixed formatting errors which hid entire blocks of code, and made it more readable in the editor.
parent
3bbc8dc5b0
commit
ea22a78ac0
1 changed files with 64 additions and 52 deletions
|
@ -3,68 +3,80 @@ The following instructions are for installing Sonarr on CentOS 7.
|
||||||
Please note these were the steps taken by an experienced user.
|
Please note these were the steps taken by an experienced user.
|
||||||
|
|
||||||
*If you don't feel like fighting SELinux
|
*If you don't feel like fighting SELinux
|
||||||
<pre>setenforce 0</pre>
|
|
||||||
**And ensure it stays that way
|
setenforce 0
|
||||||
***vi /etc/selinux/config
|
|
||||||
***change enforced to disabled
|
*And to ensure it stays that way
|
||||||
|
|
||||||
|
vi /etc/selinux/config
|
||||||
|
Find the value enforcing, and change to disabled
|
||||||
|
|
||||||
*Install some repos and packages
|
*Install some repos and packages
|
||||||
<pre>
|
|
||||||
yum install epel-release yum-utils -y
|
yum install epel-release yum-utils -y
|
||||||
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
|
rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"
|
||||||
yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
|
yum-config-manager --add-repo http://download.mono-project.com/repo/centos/
|
||||||
yum install mediainfo libzen libmediainfo curl gettext mono-core mono-devel sqlite.x86_64 -y
|
yum install mediainfo libzen libmediainfo curl gettext mono-core mono-devel sqlite.x86_64 -y
|
||||||
</pre>
|
|
||||||
*Add a user for sonarr to use
|
*Add a user for sonarr to use
|
||||||
<pre>useradd sonarr -s /sbin/nologin</pre>
|
|
||||||
|
useradd sonarr -s /sbin/nologin
|
||||||
|
|
||||||
*Download, extract and move sonarr
|
*Download, extract and move sonarr
|
||||||
<pre>
|
|
||||||
wget http://update.sonarr.tv/v2/master/mono/NzbDrone.master.tar.gz
|
wget http://update.sonarr.tv/v2/master/mono/NzbDrone.master.tar.gz
|
||||||
tar -xvf ~/NzbDrone.master.tar.gz -C /opt/
|
tar -xvf ~/NzbDrone.master.tar.gz -C /opt/
|
||||||
rm -f NzbDrone.master.tar.gz
|
rm -f NzbDrone.master.tar.gz
|
||||||
mv /opt/NzbDrone /opt/sonarr
|
mv /opt/NzbDrone /opt/sonarr
|
||||||
</pre>
|
|
||||||
*Change ownership of the install directory
|
*Change ownership of the install directory
|
||||||
<pre>chown -R sonarr:sonarr /opt/sonarr</pre>
|
|
||||||
|
chown -R sonarr:sonarr /opt/sonarr
|
||||||
|
|
||||||
*Create your systemd unit file
|
*Create your systemd unit file
|
||||||
<pre>
|
|
||||||
cat > sonarr.service << EOF
|
|
||||||
[Unit]
|
|
||||||
Description=Sonarr Daemon
|
|
||||||
After=syslog.target network.target
|
|
||||||
|
|
||||||
[Service]
|
cat > sonarr.service << EOF
|
||||||
User=sonarr
|
|
||||||
Group=sonarr
|
[Unit]
|
||||||
|
Description=Sonarr Daemon
|
||||||
|
After=syslog.target network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=sonarr
|
||||||
|
Group=sonarr
|
||||||
|
|
||||||
|
Type=simple
|
||||||
|
ExecStart=/usr/bin/mono /opt/sonarr/NzbDrone.exe -nobrowser -data /opt/sonarr
|
||||||
|
TimeoutStopSec=20
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
EOF
|
||||||
|
|
||||||
|
|
||||||
Type=simple
|
|
||||||
ExecStart=/usr/bin/mono /opt/sonarr/NzbDrone.exe -nobrowser -data /opt/sonarr
|
|
||||||
TimeoutStopSec=20
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
||||||
EOF
|
|
||||||
</pre>
|
|
||||||
*Now move the unit file to the proper location
|
*Now move the unit file to the proper location
|
||||||
<pre>mv sonarr.service /usr/lib/systemd/system/</pre>
|
|
||||||
|
mv sonarr.service /usr/lib/systemd/system/
|
||||||
|
|
||||||
*Add firewall exceptions if the firewall is enabled
|
*Add firewall exceptions if the firewall is enabled
|
||||||
<pre>
|
|
||||||
cat > sonarr.xml << EOF
|
cat > sonarr.xml << EOF
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<service>
|
|
||||||
<short>sonarr</short>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<description>Sonarr Download Service</description>
|
<service>
|
||||||
<port protocol="tcp" port="8989"/>
|
<short>sonarr</short>
|
||||||
</service>
|
<description>Sonarr Download Service</description>
|
||||||
EOF
|
<port protocol="tcp" port="8989"/>
|
||||||
mv sonarr.xml /etc/firewalld/services/
|
</service>
|
||||||
firewall-cmd --permanent --add-service sonarr
|
EOF
|
||||||
firewall-cmd --reload
|
|
||||||
</pre>
|
mv sonarr.xml /etc/firewalld/services/
|
||||||
*enable sonarr to run on startup, and start!
|
firewall-cmd --permanent --add-service sonarr
|
||||||
<pre>
|
firewall-cmd --reload
|
||||||
systemctl enable sonarr.service
|
|
||||||
systemctl start sonarr.service
|
*Enable sonarr to run on startup, and start!
|
||||||
</pre>
|
|
||||||
|
systemctl enable sonarr.service
|
||||||
|
systemctl start sonarr.service
|
||||||
|
|
Loading…
Add table
Reference in a new issue