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
howto:linux:install:gentoo [2012/08/11 23:05]
danomac Adding more content
howto:linux:install:gentoo [2015/01/19 14:51] (current)
zip [Java Runtime Environment (JRE)]
Line 24: Line 24:
  
 There are two different versions of JREs to choose from. **You only need to choose one of the two choices presented below!** The easiest is to use icedtea, but Sun's Java version is also available but it requires more effort to install. Once a JRE is installed, you need to make sure it is selected as the current JRE. There are two different versions of JREs to choose from. **You only need to choose one of the two choices presented below!** The easiest is to use icedtea, but Sun's Java version is also available but it requires more effort to install. Once a JRE is installed, you need to make sure it is selected as the current JRE.
 +
 +FIXME java 8 required now
  
 === Icedtea === === Icedtea ===
Line 55: Line 57:
 </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 120:
 </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 129: Line 131:
  
 <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.0.1 /opt/serviio+# mv /opt/serviio-1.1 /opt/serviio
 </code> </code>
  
Line 143: Line 145:
 ===== Start Serviio as a Service ===== ===== Start Serviio as a Service =====
  
-These instructions will provide a way to sun Serviio as a service under a non-root user.+These instructions will provide a way to sun Serviio as a service under a non-root user. A user needs to be created for this purpose, then scripts added to be able to start and stop the service.
  
-First, create a new user:+==== Creating a New User ==== 
 + 
 +To create a new user, use:
  
 <code> <code>
Line 157: Line 161:
 </code> </code>
  
-The console like to write logs to the log directory, so we need to make that directory writeable:+==== 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> <code>
-chmod -R 777 /opt/serviio/log+mv serviio_conf /etc/conf.d/serviio 
 +# mv serviio_init /etc/init.d/serviio 
 +# chmod +x /etc/init.d/serviio
 </code> </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>
  
-===== Troubleshooting ===== +To get Serviio to start automatically on startup:
- +
-This is a work in progress. Check back later.+
  
 +<code>
 +# rc-update add serviio default
 +</code>
 ~~NOTOC~~ ~~NOTOC~~
howto/linux/install/gentoo.1344726311.txt.gz · Last modified: 2012/08/11 23:05 by danomac