User Tools

Site Tools


howto:linux:install:gentoo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
howto:linux:install:gentoo [2012/08/11 22:28]
danomac Adding more content
howto:linux:install:gentoo [2013/01/10 17:36]
zip [Extract Serviio]
Line 5: Line 5:
 ===== Notes ===== ===== Notes =====
  
-Instructions in this article assume a 64-bit install. If you are using a 32-bit install you will have to substitute 'amd64' references with 'x86'.+Instructions in this article assumes a 64-bit install. If you are using a 32-bit install you will have to substitute 'amd64' references with 'x86'.
  
 ===== Prerequisites ===== ===== Prerequisites =====
Line 55: Line 55:
 </code> </code>
  
-Now you can proceed to the [[syntax:Download Serviio|Download Serviio]] section.+Now you can proceed to the [[howto:linux:install:gentoo#Download Serviio|Download Serviio]] section.
  
 === Sun JRE === === Sun JRE ===
Line 118: Line 118:
 </code> </code>
  
-Now you can proceed to the [[syntax:Download Serviio|Download Serviio]] section.+Now you can proceed to the [[howto:linux:install:gentoo#Download Serviio|Download Serviio]] section.
  
 ===== Download Serviio ===== ===== Download Serviio =====
Line 126: Line 126:
 ===== Extract Serviio ===== ===== Extract Serviio =====
  
-Once the tarball has been downloaded, extract it:+Once the tarball has been downloaded, extract it and rename it:
  
 <code> <code>
-# tar zxf serviio-1.0.1-linux.tar.gz -C /opt+# tar zxf serviio-1.1-linux.tar.gz -C /opt 
 +# mv /opt/serviio-1.1 /opt/serviio
 </code> </code>
  
Line 142: Line 143:
 ===== Start Serviio as a Service ===== ===== Start Serviio as a Service =====
  
-This is work in progressCheck back later.+These instructions will provide way to sun Serviio as a service under a non-root userA user needs to be created for this purpose, then scripts added to be able to start and stop the service.
  
-===== Troubleshooting =====+==== Creating a New User ====
  
-This is work in progress. Check back later.+To create new user, use:
  
 +<code>
 +# useradd -d /opt/serviio -r serviio
 +</code>
 +
 +Then, change the permissions on /opt/serviio to match the username:
 +
 +<code>
 +# chown -R serviio:serviio /opt/serviio
 +</code>
 +
 +==== Setting Up Initscripts ====
 +
 +Here are some initscripts that can be used to start and stop Serviio. Two are needed, one is /etc/conf.d/serviio, and the other is /etc/init.d/serviio (save them and move them to the appropriate place.)
 +
 +<file bash serviio_conf>
 +# /etc/conf.d/serviio
 +
 +# Location of serviio.sh
 +SERVIIO_CMD=/opt/serviio/bin/serviio.sh
 +
 +# The user Serviio should run under
 +SERVIIO_USER=serviio
 +</file>
 +
 +<file bash serviio_init>
 +#!/sbin/runscript
 +# Copyright 1999-2012 Gentoo Foundation
 +# Distributed under the terms of the GNU General Public License v2
 +# $Header: $
 +
 +depend() {
 +        need net
 +}
 +
 +start() {
 +        ebegin "Starting Serviio Media Server"
 +        start-stop-daemon --start --exec ${SERVIIO_CMD} --make-pidfile \
 +                --user ${SERVIIO_USER} --background \
 +                --pidfile /var/run/serviio.pid
 +        eend $?
 +}
 +
 +stop() {
 +        ebegin "Stopping Serviio Media Server"
 +        ${SERVIIO_CMD} -stop
 +        start-stop-daemon --stop \
 +                --user ${SERVIIO_USER} --pidfile /var/run/serviio.pid
 +        eend $?
 +}
 +</file>
 +
 +Once downloaded, move them to their appropriate locations:
 +
 +<code>
 +# mv serviio_conf /etc/conf.d/serviio
 +# mv serviio_init /etc/init.d/serviio
 +# chmod +x /etc/init.d/serviio
 +</code>
 +
 +You can then start and stop Serviio with:
 +
 +<code>
 +# /etc/init.d/serviio start
 + * Starting Serviio Media Server ...  [ ok ]
 +# /etc/init.d/serviio stop
 + * Stopping Serviio Media Server ...  [ ok ]
 +</code>
 +
 +To get Serviio to start automatically on startup:
 +
 +<code>
 +# rc-update add serviio default
 +</code>
 ~~NOTOC~~ ~~NOTOC~~
howto/linux/install/gentoo.txt · Last modified: 2015/01/19 14:51 by zip