This shows you the differences between two versions of the page.
Next revision | Previous revision Last revision Both sides next revision | ||
install_wd [2012/01/03 07:31] cerberus created |
install_wd [2012/01/12 08:37] cerberus |
||
---|---|---|---|
Line 1: | Line 1: | ||
1) Go to http:// | 1) Go to http:// | ||
+ | Then select Settings-> | ||
+ | Under Settings-> | ||
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 | ||
< | < | ||
- | | + | wget http:// |
- | sh setup-mybooklive.sh | + | sh setup-mybooklive.sh |
- | echo " | + | echo " |
- | echo " | + | echo " |
- | logout</ | + | logout</ |
- | + | ||
Log back into the SSH | Log back into the SSH | ||
Line 17: | Line 17: | ||
< | < | ||
- | | + | ipkg update |
- | ipkg install nano | + | ipkg install nano |
- | nano</ | + | nano</ |
A basic editor opens, hit ctrl-x to close. | A basic editor opens, hit ctrl-x to close. | ||
Line 27: | Line 26: | ||
< | < | ||
- | | + | ipkg install coreutils |
- | ln -s / | + | ln -s / |
- | + | ||
5) Install Java | 5) Install Java | ||
< | < | ||
- | | + | apt-get update |
- | java -version | + | apt-get install --allow-unauthenticated debian-keyring |
- | export JAVA_HOME=/ | + | apt-get install --allow-unauthenticated debian-archive-keyring |
- | + | apt-get install openjdk-6-jdk | |
+ | java -version | ||
+ | export JAVA_HOME=/ | ||
+ | export PATH=$PATH:/usr/lib/jvm/java-6-openjdk/ | ||
6) Install Serviio and setup user account to run the program | 6) Install Serviio and setup user account to run the program | ||
< | < | ||
- | | + | useradd serviio |
- | passwd serviio | + | passwd serviio |
- | + | usermod | |
- | mkdir / | + | |
- | cd / | + | |
- | wget http:// | + | |
- | tar -xf serviio-0.6.0.1-linux.tar.gz | + | |
- | chown serviio -R / | + | |
+ | mkdir / | ||
+ | cd / | ||
+ | wget http:// | ||
+ | tar -xf serviio-0.6.1-linux.tar.gz</ | ||
7) Launch Serviio as a test | 7) Launch Serviio as a test | ||
< | < | ||
- | | + | cd serviio-0.6.1/ |
- | serviio.sh</ | + | serviio.sh |
- | + | 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 | + | |
< | < | ||
- | | + | tail -f / |
- | + | ||
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 67: | ||
< | < | ||
- | | + | nano / |
- | + | 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/ | |
- | + | ||
- | 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/ | + | |
< | < | ||
- | | + | ######################################################### |
- | #- Daemon Script Configuration for Serviio Media Server | + | #- Daemon Script Configuration for Serviio Media Server |
- | #- By Ian Laird | + | #- By Ian Laird |
- | #- / | + | #- / |
- | ######################################################### | + | ######################################################### |
- | + | ||
- | NAME=" | + | |
- | DAEMON="/ | + | |
- | SERVICE_ACCOUNT=" | + | |
+ | NAME=" | ||
+ | DAEMON="/ | ||
+ | SERVICE_ACCOUNT=" | ||
Line 95: | Line 85: | ||
< | < | ||
- | #!/bin/sh | + | nano / |
- | # | + | Paste the following code. |
- | ######################################################### | + | |
- | #- Daemon script for Serviio media server | + | |
- | #- By Ian Laird; converted for Debian by Jacob Lundberg | + | |
- | #- / | + | |
- | ######################################################### | + | |
- | # | + | |
- | ### BEGIN INIT INFO | + | |
- | # Provides: | + | |
- | # Required-Start: | + | |
- | # Required-Stop: | + | |
- | # Default-Start: | + | |
- | # Default-Stop: | + | |
- | # X-Interactive: | + | |
- | # Short-Description: | + | |
- | # Description: | + | |
- | # all kinds of networked devices. | + | |
- | ### END INIT INFO | + | |
+ | < | ||
+ | #!/bin/sh | ||
+ | # | ||
+ | ######################################################### | ||
+ | #- Daemon script for Serviio media server | ||
+ | #- By Ian Laird; converted for Debian by Jacob Lundberg | ||
+ | #- / | ||
+ | ######################################################### | ||
+ | # | ||
+ | ### BEGIN INIT INFO | ||
+ | # Provides: | ||
+ | # Required-Start: | ||
+ | # Required-Stop: | ||
+ | # Default-Start: | ||
+ | # Default-Stop: | ||
+ | # X-Interactive: | ||
+ | # Short-Description: | ||
+ | # Description: | ||
+ | # all kinds of networked devices. | ||
+ | ### END INIT INFO | ||
- | . / | ||
- | if [ -f / | + | |
- | | + | |
- | fi | + | |
+ | if [ -f / | ||
+ | . / | ||
+ | fi | ||
- | DAEMON_STOP=" | ||
- | NAME=" | ||
- | PIDFILE="/ | ||
- | TIMEOUT=10 | ||
- | if [ -f /etc/default/ | + | DAEMON_STOP=" |
- | | + | NAME=" |
- | fi | + | PIDFILE=" |
+ | | ||
- | | + | if [ -f / |
+ | . / | ||
+ | fi | ||
+ | [ -x " | ||
- | running() { | ||
- | if [ " | ||
- | echo 0 | ||
- | return 1 | ||
- | fi | ||
- | PS=$(ps h -p $(echo | + | running() { |
- | echo $PS | + | if [ "x$1" == " |
+ | echo 0 | ||
+ | return 1 | ||
+ | fi | ||
- | if [ $PS -gt 0 ]; then | + | |
- | | + | echo $PS |
- | else | + | |
- | return 1 | + | |
- | fi | + | |
- | } | + | |
+ | if [ $PS -gt 0 ]; then | ||
+ | return 0 | ||
+ | else | ||
+ | return 1 | ||
+ | fi | ||
+ | } | ||
- | start() { | ||
- | # Set up correct LANG | ||
- | if [ -r / | ||
- | . / | ||
- | | ||
- | fi | ||
- | log_daemon_msg " | + | |
- | | + | # Set up correct LANG |
- | | + | if [ -r / |
- | } | + | . / |
+ | export LANG LANGUAGE LC_MESSAGES LC_ALL LC_CTYPE | ||
+ | fi | ||
- | stop() { | + | |
- | | + | start-stop-daemon --start -q -b -p " |
- | if [ -r " | + | |
- | PIDS=$(pstree | + | } |
- | if running | + | |
- | | + | |
- | for PID in $PIDS; do | + | |
- | if running $PID > /dev/null; then | + | |
- | kill -TERM $PID | + | |
- | fi | + | |
- | done | + | |
- | fi | + | |
- | COUNTDOWN=$TIMEOUT | + | |
- | while let COUNTDOWN--; | + | |
- | if ! running " | + | |
- | 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 | + | |
- | | + | stop() { |
- | | + | log_daemon_msg " |
- | else | + | if [ -r " |
- | | + | PIDS=$(pstree -p $(<" |
- | | + | |
- | fi | + | " |
- | } | + | for PID in $PIDS; do |
+ | if running $PID > /dev/null; then | ||
+ | | ||
+ | fi | ||
+ | done | ||
+ | fi | ||
+ | COUNTDOWN=$TIMEOUT | ||
+ | while let COUNTDOWN--; | ||
+ | if ! running | ||
+ | | ||
+ | fi | ||
+ | if [ $COUNTDOWN -eq 0 ]; then | ||
+ | for PID in $PIDS; do | ||
+ | if running $PID > /dev/null; then | ||
+ | kill -KILL $PID | ||
+ | | ||
+ | | ||
+ | else | ||
+ | echo -n . | ||
+ | sleep 1 | ||
+ | fi | ||
+ | done | ||
+ | fi | ||
- | status() { | + | |
- | echo -n "$NAME should be" | + | |
- | | + | else |
- | echo -n " up with primary PID $(<" | + | |
- | | + | |
- | RUNNING=$(running " | + | fi |
- | if [[ $RUNNING && $RUNNING -gt 0 ]]; then | + | } |
- | echo -n " and $RUNNING processes are running." | + | |
- | else | + | |
- | | + | |
- | fi | + | |
- | | + | |
- | echo -n " stopped." | + | |
- | | + | |
- | | + | |
- | | + | |
+ | status() { | ||
+ | echo -n "$NAME should be" | ||
+ | if [ -r " | ||
+ | echo -n " up with primary PID $(<" | ||
+ | PIDS=$(pstree -p $(<" | ||
+ | RUNNING=$(running " | ||
+ | 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 " | ||
- | start) | ||
- | start | ||
- | ;; | ||
- | stop) | ||
- | stop | ||
- | ;; | ||
- | restart) | ||
- | stop | ||
- | start | ||
- | ;; | ||
- | status) | ||
- | status | ||
- | ;; | ||
- | *) | ||
- | log_success_msg " | ||
- | exit 1 | ||
- | ;; | ||
- | esac | ||
- | | + | case " |
+ | start) | ||
+ | start | ||
+ | ;; | ||
+ | stop) | ||
+ | stop | ||
+ | ;; | ||
+ | restart) | ||
+ | stop | ||
+ | start | ||
+ | ;; | ||
+ | status) | ||
+ | status | ||
+ | ;; | ||
+ | *) | ||
+ | log_success_msg " | ||
+ | exit 1 | ||
+ | ;; | ||
+ | esac | ||
+ | |||
+ | | ||
Line 247: | Line 241: | ||
< | < | ||
- | | + | chown serviio -R / |
- | update-rc.d serviio defaults</ | + | chmod 755 / |
+ | update-rc.d serviio defaults</ | ||
+ | Reboot MyBook Live. Check status when back up by using either the tail command above, or | ||
+ | < | ||
+ | / | ||
- | Reboot MyBook Live. Check 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 | ||
- | < | + | < |
+ | nano /etc/apt/sources.list</ | ||
+ | Add the following line to the file and save. | ||
+ | < | ||
+ | deb http:// | ||
+ | 9b) Finish Installation | ||
+ | |||
+ | < | ||
+ | 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</ | ||
- | 9) Access server through the console, use http:// | + | 10) Access server through the console, use http:// |
- | 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. |
< | < | ||
- | | + | / |
- | / | + | / |
- | + | ||
- | <note important> | + |