User Tools

Site Tools


linux_install_fedora

Differences

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

Link to this comparison view

Next revision
Previous revision
linux_install_fedora [2011/11/10 17:24]
abeloin created
— (current)
Line 1: Line 1:
-====== Fedora Installation Guide ====== 
-Based on [[http://www.clearfoundation.com/component/option,com_kunena/Itemid,232/catid,40/func,view/id,25951/|Clear Foundation's Howto]] 
-==== Prerequisites ==== 
-  * Java<code>yum install java-1.6.0-openjdk</code> 
-  * Ffmpeg<code>yum install ffmpeg</code> 
-==== 1.Download Serviio ==== 
-<code>wget http://download.serviio.org/releases/serviio-0.6.0.1-linux.tar.gz</code> 
-==== 2.Extract Serviio ==== 
-<code>tar -C /opt -zxvf serviio-0.6.0.1-linux.tar.gz 
-mv /opt/serviio-0.6.0.1 /opt/serviio</code> 
-==== 3.Create Serviio's user ==== 
-<code>useradd -d /opt/serviio -r serviio 
-chown -R serviio:serviio /opt/serviio 
-</code> 
-==== 4.Initscript for Serviio ==== 
-Create the initscript /etc/init.d/serviio with the following code: 
-<code>#! /bin/sh 
-# 
-# chkconfig 35 85 15 
-# description: Start the serviio DLNA server in headless mode 
-### BEGIN INIT INFO 
-# Provides: serviio 
-# Required-Start: $network 
-# Required-Stop: $network 
-# Default-Start: 3 5 
-# Default-Stop: 0 1 2 6 
-# Description: Start the serviio DLNA server in headless mode 
-### END INIT INFO 
  
-SERVIIO_HOME="/opt/serviio" 
-SERVIIO_DAEMON="serviio.sh" 
-SERVIIO_BIN="$SERVIIO_HOME/bin/$SERVIIO_DAEMON" 
-SERVIIO_USER="serviio" 
- 
-# Source function library. 
-. /etc/rc.d/init.d/functions 
- 
-RETVAL=0 
- 
-check() { 
-        # Check that we're a privileged user 
-        [ $(id -u) = 0 ] || exit 4 
- 
-        # Check if SERVIIO_HOME exists 
-        test -d "$SERVIIO_HOME" || exit 5 
- 
-        # Check if SERVIIO_BIN is executable 
-        test -x "$SERVIIO_BIN" || exit 5 
-} 
- 
-start() { 
-        check 
-        echo -n "Starting Serviio DLNA server: " 
- /bin/su --session-command="$SERVIIO_BIN -headless" $SERVIIO_USER & 
-        RETVAL=$? 
-        if [ $RETVAL -eq 0 ]; then 
-            touch /var/lock/subsys/serviio.sh 
-            echo_success 
-        else 
-            echo_failure 
-        fi 
-        echo 
-        return $RETVAL 
-} 
- 
-stop() { 
-    check 
-    echo -n "Shutting down Serviio DLNA daemon: " 
-    # Retrieve JAVA Serviio process ID 
-    PIDDAEMON=`pgrep $SERVIIO_DAEMON` 
-    [ -z "$PIDDAEMON" ] || PIDJAVA=`ps -o pid= --ppid $PIDDAEMON` 
-    # Kill the daemon 
-    killproc "$SERVIIO_BIN" 
-    RETVAL=$? 
-    [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/serviio.sh 
-    echo 
-    # Kill the JAVA Serviio process if exists 
-    [ -z "$PIDJAVA" ] || kill -9 $PIDJAVA 
-    return $RETVAL 
-} 
- 
-restart() { 
-        stop 
-        start 
-} 
- 
- 
-case "$1" in 
-start) 
-        start 
-        ;; 
-stop) 
-        stop 
-        ;; 
-force-reload) 
-        restart 
-        ;; 
-restart) 
-        restart 
-        ;; 
-condrestart) 
-        if [ -f /var/lock/subsys/serviio.sh ]; then 
-            restart 
-        fi 
-        ;; 
-status) 
-        status serviio.sh 
-        ;; 
-*) 
-        echo $"Usage: $0 {start|stop|status|restart|condrestart|force-reload}" 
-        RETVAL=2 
-esac 
- 
-exit $RETVAL 
-</code> 
-==== 5.Enable service ==== 
-<code>chmod +x /etc/init.d/serviio 
-chkconfig --add serviio 
-systemctl --system daemon-reload</code> 
-==== 6.Start Serviio ==== 
-<code>systemctl start serviio.service</code> 
linux_install_fedora.1320945876.txt.gz ยท Last modified: 2011/11/10 17:24 by abeloin