User Tools

Site Tools


install_wd

Differences

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

Link to this comparison view

Next revision
Previous revision
install_wd [2012/01/03 07:31]
cerberus created
install_wd [2012/01/12 08:41] (current)
cerberus Updated to thejazzman's new version..
Line 1: Line 1:
 1) Go to http://mybooklive/UI/ssh (case sensitive) replace "mybooklive" if you have renamed it to something else, or replace it with its IP address. It's a hidden UI menu to enable SSH. 1) Go to http://mybooklive/UI/ssh (case sensitive) replace "mybooklive" if you have renamed it to something else, or replace it with its IP address. It's a hidden UI menu to enable SSH.
 +Then select Settings->Media-> and turn of Twonky
 +Under Settings->System->Updates-> Turn off Automatic Updates. 
  
 2) Log in to through SSH by the IP for the device, then Install Optware 2) Log in to through SSH by the IP for the device, then Install Optware
  
 <code> <code>
-    wget http://mybookworld.wikidot.com/local--files/optware/setup-mybooklive.sh +wget http://mybookworld.wikidot.com/local--files/optware/setup-mybooklive.sh 
-    sh setup-mybooklive.sh +sh setup-mybooklive.sh 
-    echo "export PATH=$PATH:/opt/bin:/opt/sbin:." >> /root/.bashrc +echo "export PATH=$PATH:/opt/bin:/opt/sbin:." >> /root/.bashrc 
-    echo "export PATH=$PATH:/opt/bin:/opt/sbin:." >> /etc/profile +echo "export PATH=$PATH:/opt/bin:/opt/sbin:." >> /etc/profile 
-    logout</code> +logout 
- +</code>
  
 Log back into the SSH Log back into the SSH
Line 17: Line 18:
  
 <code> <code>
-    ipkg update +ipkg update 
-    ipkg install nano +ipkg install nano 
-    nano</code> +nano 
 +</code>
  
 A basic editor opens, hit ctrl-x to close. A basic editor opens, hit ctrl-x to close.
Line 27: Line 28:
  
 <code> <code>
-    ipkg install coreutils +ipkg install coreutils 
-    ln -s /opt/bin/coreutils-dirname /usr/bin/dirname</code> +ln -s /opt/bin/coreutils-dirname /usr/bin/dirname 
- +</code>
  
 5) Install Java 5) Install Java
  
 <code> <code>
-    apt-get install openjdk-6-jdk +apt-get update 
-    java -version +apt-get install --allow-unauthenticated debian-keyring 
-    export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/jre/bin/java</code> +apt-get install --allow-unauthenticated debian-archive-keyring 
- +apt-get install openjdk-6-jdk 
 +java -version 
 +export JAVA_HOME=/usr/lib/jvm/java-6-openjdk/jre 
 +export PATH=$PATH:/usr/lib/jvm/java-6-openjdk/jre 
 +</code>
  
 6) Install Serviio and setup user account to run the program 6) Install Serviio and setup user account to run the program
  
 <code> <code>
-    useradd serviio +useradd serviio 
-    passwd serviio +passwd serviio 
- +usermod --G root serviio
-    mkdir /usr/local/serviio/ +
-    cd /usr/local/serviio/ +
-    wget http://download.serviio.org/releases/serviio-0.6.0.1-linux.tar.gz +
-    tar -xf serviio-0.6.0.1-linux.tar.gz +
-    chown serviio -R /usr/local/serviio</code> +
  
 +mkdir /usr/local/serviio/
 +cd /usr/local/serviio/
 +wget http://download.serviio.org/releases/serviio-0.6.1-linux.tar.gz
 +tar -xf serviio-0.6.1-linux.tar.gz
 +</code>
  
 7) Launch Serviio as a test 7) Launch Serviio as a test
  
 <code> <code>
-    cd serviio-0.6.0.1/bin +cd serviio-0.6.1/bin 
-    serviio.sh</code>+serviio.sh 
 +</code>
  
- +You will be at a blank line, it appears like nothing is happening, yet the server is starting. One way to confirm is to open another ssh window, log in and run 
-You will be at a blank line, it appears like nothing is happening, yet the server is starting. One way to confirm is to open another ssh window, log in and run+
  
 <code> <code>
-    tail -f /usr/local/serviio/serviio-0.6.0.1/log/serviio.log</code> +tail -f /usr/local/serviio/serviio-0.6.1/log/serviio.log 
- +</code>
 This will show a live output of the serviio log file. When you are satisfied that it's launching, hit ctrl-c in both ssh windows. This will show a live output of the serviio log file. When you are satisfied that it's launching, hit ctrl-c in both ssh windows.
  
Line 74: Line 75:
  
 <code> <code>
-    nano /etc/default/serviiod</code> +nano /etc/default/serviiod 
 +</code>
  
 Copy following code, the service account is the name of the account we created in step 6. Also, the Daemon is the path to the serviio.sh file, update if you use a different version/location. Copy following code, the service account is the name of the account we created in step 6. Also, the Daemon is the path to the serviio.sh file, update if you use a different version/location.
  
 <code> <code>
-    ######################################################### +######################################################### 
-    #- Daemon Script Configuration for Serviio Media Server +#- Daemon Script Configuration for Serviio Media Server 
-    #- By Ian Laird +#- By Ian Laird 
-    #- /etc/default/serviiod +#- /etc/default/serviiod 
-    ######################################################### +#########################################################
- +
-    NAME="Serviio Media Server" +
-    DAEMON="/usr/local/serviio/serviio-0.6.0.1//bin/serviio.sh"    ## Update this to point at serviio_root/bin/serviio.sh +
-    SERVICE_ACCOUNT="serviio" ## DON'T RUN UNDER ROOT!</code>+
  
 +NAME="Serviio Media Server"
 +DAEMON="/usr/local/serviio/serviio-0.6.1/bin/serviio.sh"    ## Update this to point at serviio_root/bin/serviio.sh
 +SERVICE_ACCOUNT="serviio" ## DON'T RUN UNDER ROOT!</code>
  
  
Line 95: Line 95:
  
 <code> <code>
-        #!/bin/sh +nano /etc/init.d/serviio</code> 
-        # +Paste the following code.
-        ######################################################### +
-        #- Daemon script for Serviio media server +
-        #- By Ian Laird; converted for Debian by Jacob Lundberg +
-        #- /etc/init.d/serviio +
-        ######################################################### +
-        # +
-        ### BEGIN INIT INFO +
-        # Provides:          serviio +
-        # Required-Start:    $local_fs $remote_fs $network $syslog +
-        # Required-Stop:     $local_fs $remote_fs $network $syslog +
-        # Default-Start:     2 3 4 5 +
-        # Default-Stop:      0 1 6 +
-        # X-Interactive:     true +
-        # Short-Description: Start/stop serviio media server +
-        # Description:       The Serviio media server makes your media available to +
-        #                    all kinds of networked devices. +
-        ### END INIT INFO+
  
 + <code>
 +    #!/bin/sh
 +    #
 +    #########################################################
 +    #- Daemon script for Serviio media server
 +    #- By Ian Laird; converted for Debian by Jacob Lundberg
 +    #- /etc/init.d/serviio
 +    #########################################################
 +    #
 +    ### BEGIN INIT INFO
 +    # Provides:          serviio
 +    # Required-Start:    $local_fs $remote_fs $network $syslog
 +    # Required-Stop:     $local_fs $remote_fs $network $syslog
 +    # Default-Start:     2 3 4 5
 +    # Default-Stop:      0 1 6
 +    # X-Interactive:     true
 +    # Short-Description: Start/stop serviio media server
 +    # Description:       The Serviio media server makes your media available to
 +    #                    all kinds of networked devices.
 +    ### END INIT INFO
  
-        . /lib/lsb/init-functions 
  
-        if [ -f /etc/default/rcS ]; then +    . /lib/lsb/init-functions
-                . /etc/default/rcS +
-        fi+
  
 +    if [ -f /etc/default/rcS ]; then
 +            . /etc/default/rcS
 +    fi
  
-        DAEMON_STOP=" -stop" 
-        NAME="$(basename $0)" 
-        PIDFILE="/var/run/serviiod.pid" 
-        TIMEOUT=10 
  
-        if [ -/etc/default/serviiod ]; then +    DAEMON_STOP=" -stop" 
-                /etc/default/serviiod +    NAME="$(basename $0)" 
-        fi+    PIDFILE="/var/run/serviiod.pid" 
 +    TIMEOUT=10
  
-        [ -x "$DAEMON" || exit 0+    if [ -f /etc/default/serviiod ]; then 
 +            . /etc/default/serviiod 
 +    fi
  
 +    [ -x "$DAEMON" ] || exit 0
  
-        running() { 
-                if [ "x$1" == "x" ]; then 
-                        echo 0 
-                        return 1 
-                fi 
  
-                PS=$(ps h -p $(echo $1 | sed -r 's/[\t \n]+/ -p /') | wc -l) +    running() { 
-                echo $PS+            if [ "x$1" == "x" ]; then 
 +                    echo 
 +                    return 1 
 +            fi
  
-                if [ $PS -gt 0 ]; then +            PS=$(ps h -p $(echo $1 | sed -r 's/[\t \n]+/ -p /') | wc -l) 
-                        return 0 +            echo $PS
-                else +
-                        return 1 +
-                fi +
-        }+
  
 +            if [ $PS -gt 0 ]; then
 +                    return 0
 +            else
 +                    return 1
 +            fi
 +    }
  
-        start() { 
-           # Set up correct LANG 
-              if [ -r /etc/default/locale ]; then 
-                 . /etc/default/locale 
-                 export LANG LANGUAGE LC_MESSAGES LC_ALL LC_CTYPE 
-              fi 
  
-                log_daemon_msg "Starting Serviio media server daemon" "$NAME" +    start() { 
-                start-stop-daemon --start -q -b -p "$PIDFILE" -m -c "${SERVICE_ACCOUNT}" -x "${DAEMON}" +       # Set up correct LANG 
-                log_end_msg $? +          if [ -r /etc/default/locale ]; then 
-        }+             . /etc/default/locale 
 +             export LANG LANGUAGE LC_MESSAGES LC_ALL LC_CTYPE 
 +          fi
  
-        stop() { +            log_daemon_msg "Starting Serviio media server daemon" "$NAME" 
-                log_daemon_msg "Stopping Serviio media server daemon" "$NAME" +            start-stop-daemon --start -q -b -p "$PIDFILE" --"${SERVICE_ACCOUNT}" -x "${DAEMON}" 
-                if [ -r "$PIDFILE" ]; then +            log_end_msg $? 
-                        PIDS=$(pstree -p $(<"$PIDFILE") | awk -F'[\(\)]' '/^[A-Za-z0-9]/ { print $2" "$4; }') +    }
-                        if running "$PIDS" > /dev/null; then +
-                                "${DAEMON}" "${DAEMON_STOP}" +
-                                for PID in $PIDS; do +
-                                        if running $PID > /dev/null; then +
-                                                kill -TERM $PID +
-                                        fi +
-                                done +
-                        fi +
-                        COUNTDOWN=$TIMEOUT +
-                        while let COUNTDOWN--; do +
-                                if ! running "$PIDS" > /dev/null; then +
-                                        break +
-                                fi +
-                                if [ $COUNTDOWN -eq 0 ]; then +
-                                        for PID in $PIDS; do +
-                                                if running $PID > /dev/null; then +
-                                                        kill -KILL $PID +
-                                                fi +
-                                        done +
-                                else +
-                                        echo -n . +
-                                        sleep 1 +
-                                fi +
-                        done +
-                fi+
  
-                if running "$PIDS" > /dev/null; then +    stop() { 
-                        log_end_msg 1 +            log_daemon_msg "Stopping Serviio media server daemon" "$NAME" 
-                else +            if [ -r "$PIDFILE" ]; then 
-                        rm -"$PIDFILE+                    PIDS=$(pstree -p $(<"$PIDFILE") | awk -F'[\(\)]' '/^[A-Za-z0-9]/ { print $2" "$4; }') 
-                        log_end_msg $? +                    if running "$PIDS" > /dev/null; then 
-                fi +                            "${DAEMON}" "${DAEMON_STOP}" 
-        }+                            for PID in $PIDS; do 
 +                                    if running $PID > /dev/null; then 
 +                                            kill -TERM $PID 
 +                                    fi 
 +                            done 
 +                    fi 
 +                    COUNTDOWN=$TIMEOUT 
 +                    while let COUNTDOWN--; do 
 +                            if ! running "$PIDS> /dev/null; then 
 +                                    break 
 +                            fi 
 +                            if [ $COUNTDOWN -eq 0 ]; then 
 +                                    for PID in $PIDS; do 
 +                                            if running $PID > /dev/null; then 
 +                                                    kill -KILL $PID 
 +                                            fi 
 +                                    done 
 +                            else 
 +                                    echo -n . 
 +                                    sleep 1 
 +                            fi 
 +                    done 
 +            fi
  
-        status() { +            if running "$PIDS" /dev/null; then 
-                echo -n "$NAME should be" +                    log_end_msg 1 
-                if [ -r "$PIDFILE" ]; then +            else 
-                        echo -n " up with primary PID $(<"$PIDFILE")" +                    rm -"$PIDFILE
-                        PIDS=$(pstree -p $(<"$PIDFILE") | awk -F'[\(\)]' '/^[A-Za-z0-9]{ print $2" "$4; }') +                    log_end_msg $? 
-                        RUNNING=$(running "$PIDS"+            fi 
-                        if [[ $RUNNING && $RUNNING -gt 0 ]]; then +    }
-                                echo -n " and $RUNNING processes are running." +
-                        else +
-                                echo -but it is not running.+
-                        fi +
-                else +
-                        echo -n " stopped." +
-                fi +
-                echo +
-        }+
  
 +    status() {
 +            echo -n "$NAME should be"
 +            if [ -r "$PIDFILE" ]; then
 +                    echo -n " up with primary PID $(<"$PIDFILE")"
 +                    PIDS=$(pstree -p $(<"$PIDFILE") | awk -F'[\(\)]' '/^[A-Za-z0-9]/ { print $2" "$4; }')
 +                    RUNNING=$(running "$PIDS")
 +                    if [[ $RUNNING && $RUNNING -gt 0 ]]; then
 +                            echo -n " and $RUNNING processes are running."
 +                    else
 +                            echo -n " but it is not running."
 +                    fi
 +            else
 +                    echo -n " stopped."
 +            fi
 +            echo
 +    }
  
-        case "${1:-}" in 
-                start) 
-                        start 
-                ;; 
-                stop) 
-                        stop 
-                ;; 
-                restart) 
-                        stop 
-                        start 
-                ;; 
-                status) 
-                        status 
-                ;; 
-                *) 
-                        log_success_msg "Usage: /etc/init.d/$NAME {start|stop|restart|status}" 
-                        exit 1 
-                ;; 
-        esac 
  
-        exit 0</code>+    case "${1:-}" in 
 +            start) 
 +                    start 
 +            ;; 
 +            stop) 
 +                    stop 
 +            ;; 
 +            restart) 
 +                    stop 
 +                    start 
 +            ;; 
 +            status) 
 +                    status 
 +            ;; 
 +            *) 
 +                    log_success_msg "Usage: /etc/init.d/$NAME {start|stop|restart|status}" 
 +                    exit 1 
 +            ;; 
 +    esac 
 + 
 +    exit 0</code>
  
  
Line 247: Line 251:
  
 <code> <code>
-    chmod 755 /etc/init.d/serviio +chown serviio -R /usr/local/serviio 
-    update-rc.d serviio defaults</code>+chmod 755 /etc/init.d/serviio 
 +update-rc.d serviio defaults</code>
  
 +Reboot MyBook Live. Check status when back up by using either the tail command above, or 
  
 +<code>
 +/etc/init.d/serviio status</code>
  
-Reboot MyBook LiveCheck status when back up by using either the tail command above, or+9) Install Updated version of FFMPEG 
 +9a) Update sources.list to include a multimedia repository
  
-<code>    /etc/init.d/serviio status</code>+<code> 
 +nano /etc/apt/sources.list</code> 
 +Add the following line to the file and save.
  
 +<code>
 +deb http://www.debian-multimedia.org stable main</code>
  
 +9b) Finish Installation
 +
 +<code>
 +apt-get update
 +apt-get install --allow-unauthenticated debian-multimedia-keyring
 +apt-get remove ffmpeg x264 libx264-dev libvpx-dev librtmp0 librtmp-dev
 +apt-get install ffmpeg</code>
  
-9) Access server through the console, use http://www.serviio.org/component/content/article/21#q2 as a reference. With respect to Mac, when entering the propertly, I placed them with the 3rd <dict> section, the one located after the property key.+10) Access server through the console, use http://www.serviio.org/component/content/article/21#q2 as a reference. With respect to Mac, when entering the property, I placed the tags within the 3rd <dict> section, the one located after the property key.
  
-10) Two other commands to stop or start the service when signed into the ssh, though you could use the console to do the same.+11) Two other commands to stop or start the service when signed into the ssh, though you could use the console to do the same.
  
 <code> <code>
-    /etc/init.d/serviio start +/etc/init.d/serviio start 
-    /etc/init.d/serviio stop</code+/etc/init.d/serviio stop</code>
-     +
-<note important>FFmpeg may require updating as it seems an old version is contain in the APT get so read this on how to manually upgrade it http://wiki.serviio.org/doku.php?id=build_ffmpeg_linux</note>+
install_wd.1325575860.txt.gz · Last modified: 2012/01/03 07:31 by cerberus