This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
howto:linux:install:gentoo [2012/08/11 22:11] danomac created |
howto:linux:install:gentoo [2015/01/19 14:51] (current) zip [Java Runtime Environment (JRE)] |
||
|---|---|---|---|
| Line 5: | Line 5: | ||
| ===== Notes ===== | ===== Notes ===== | ||
| - | Instructions in this article | + | Instructions in this article |
| ===== Prerequisites ===== | ===== Prerequisites ===== | ||
| 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: | ||
| </ | </ | ||
| - | Now you can proceed to the [[syntax:Download Serviio|Download Serviio]] section. | + | Now you can proceed to the [[howto:linux: |
| === Sun JRE === | === Sun JRE === | ||
| Line 118: | Line 120: | ||
| </ | </ | ||
| - | Now you can proceed to the [[syntax:Download Serviio|Download Serviio]] section. | + | Now you can proceed to the [[howto:linux: |
| ===== Download Serviio ===== | ===== Download Serviio ===== | ||
| Line 126: | Line 128: | ||
| ===== Extract Serviio ===== | ===== Extract Serviio ===== | ||
| + | Once the tarball has been downloaded, extract it and rename it: | ||
| + | < | ||
| + | # tar zxf serviio-1.1-linux.tar.gz -C /opt | ||
| + | # mv / | ||
| + | </ | ||
| + | This will extract the tarball into the /opt directory. | ||
| + | |||
| + | ===== Set up Serviio ===== | ||
| + | |||
| + | Now Serviio needs to be set up. Follow the instructions [[http:// | ||
| + | |||
| + | Serviio runs as a client/ | ||
| + | |||
| + | ===== Start Serviio as a Service ===== | ||
| + | |||
| + | 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. | ||
| + | |||
| + | ==== Creating a New User ==== | ||
| + | |||
| + | To create a new user, use: | ||
| + | |||
| + | < | ||
| + | # useradd -d / | ||
| + | </ | ||
| + | |||
| + | Then, change the permissions on / | ||
| + | |||
| + | < | ||
| + | # chown -R serviio: | ||
| + | </ | ||
| + | |||
| + | ==== Setting Up Initscripts ==== | ||
| + | |||
| + | Here are some initscripts that can be used to start and stop Serviio. Two are needed, one is / | ||
| + | |||
| + | <file bash serviio_conf> | ||
| + | # / | ||
| + | |||
| + | # Location of serviio.sh | ||
| + | SERVIIO_CMD=/ | ||
| + | |||
| + | # The user Serviio should run under | ||
| + | SERVIIO_USER=serviio | ||
| + | </ | ||
| + | |||
| + | <file bash serviio_init> | ||
| + | # | ||
| + | # Copyright 1999-2012 Gentoo Foundation | ||
| + | # Distributed under the terms of the GNU General Public License v2 | ||
| + | # $Header: $ | ||
| + | |||
| + | depend() { | ||
| + | need net | ||
| + | } | ||
| + | |||
| + | start() { | ||
| + | ebegin " | ||
| + | start-stop-daemon --start --exec ${SERVIIO_CMD} --make-pidfile \ | ||
| + | --user ${SERVIIO_USER} --background \ | ||
| + | --pidfile / | ||
| + | eend $? | ||
| + | } | ||
| + | |||
| + | stop() { | ||
| + | ebegin " | ||
| + | ${SERVIIO_CMD} -stop | ||
| + | start-stop-daemon --stop \ | ||
| + | --user ${SERVIIO_USER} --pidfile / | ||
| + | eend $? | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | Once downloaded, move them to their appropriate locations: | ||
| + | |||
| + | < | ||
| + | # mv serviio_conf / | ||
| + | # mv serviio_init / | ||
| + | # chmod +x / | ||
| + | </ | ||
| + | |||
| + | You can then start and stop Serviio with: | ||
| + | |||
| + | < | ||
| + | # / | ||
| + | * Starting Serviio Media Server ... [ ok ] | ||
| + | # / | ||
| + | * Stopping Serviio Media Server ... [ ok ] | ||
| + | </ | ||
| + | |||
| + | To get Serviio to start automatically on startup: | ||
| + | |||
| + | < | ||
| + | # rc-update add serviio default | ||
| + | </ | ||
| ~~NOTOC~~ | ~~NOTOC~~ | ||