HOWTO: Serviio 1.3.1 for Zyxel NSA325
I DO NOT TAKE _ANY_ RESPONSIBILITY FOR ANY LOSS OF DATA AND/OR LOSS OF WARRANTY.
---
2013-10-07
This is tested on a Zyxel NSA325 with firmware 4.61.
All packages and links below are valid as of 2013-10-02 and are the most up-to-date packages at this time.
This step borrows from this guide with full credits and acknowledgement to "burbulence" which can be found here:
http://forum.nas-central.org/viewtopic. ... 881#p68765
in the way that I have installed the packages described in that guide before trying to install Serviio 1.3.
Full credits and acknowledgement goes to "DeanoX" on his guide for Serviio 1.1 which can be found here:
viewtopic.php?f=14&t=8933
This is simply an updated version of that guide and also using it as a base for this guide.
With this being said you should be able to simply use this guide from top to bottom and come out clean with a good install even though you haven't done anything (like installing FFP) before reading this.
---
1) Install FFP 0.7
Source: http://zyxel.nas-central.org/wiki/FFP_as_zypkg [somewhat modified instructions below]
First off I’ll describe how to install FFP 0.7 as a package.
This assumes that you have already setup your NAS and installed HDD(s) etc.
- Download “Filezilla Client” and install it
- File -> Site Manager -> New Site and select:
Host: Your NAS IP (ex. 192.168.1.1)
Protocol: FTP
Logon type: Ask for password
User: admin
(Default password for the NSA325 is “1234” if you have not changed it)
Click “Connect”
(You can name this connection “NSA325 – FTP” for easier reference later on)
- Enter ftp://ftp.zyxel-tech.de/2.new_mirror/NSA325/4.40/zypkg/ in your browser and click “Save file as” on “web_prefix” and download it into the “/admin/zy-pkgs” folder on your NAS.
- Enter your NAS ip address in your browser and login as admin
- Go into NSA325 -> System Settings -> Firmware/Packages -> Package and click “Retrieve List From Internet”
- You should now see a package called “ffp”
- Click to select it and then “Install/Upgrade” and then “Apply” with all other settings default.
- After the installation you should see a link at the far right under “Management Page”, click it.
It should read “Congratulations with installing FFP on your nas.”
2) Add site definitions
Install uwsiteloader on FFP 0.7
Sources: FFP management page,
http://nas-tweaks.net/373/uwsiteloader- ... _plug-0-7/
- Download PuTTY (http://www.chiark.greenend.org.uk/~sgtatham/putty/)
(PuTTY is a single .exe file that does not need installation so please put it into your program folder and make a shortcut to your desktop in order to not accidently delete it)
- Start the program
- Enter your NAS IP (ex. 192.168.1.1) as “Host Name”, be sure to check that “SSH” is selected and click “Open” (you can enter a name under “Saved Sessions” and then “Save” to have an easy shortcut to this)
- A warning will appear, click “Yes” (no need to get into explaining this)
- login as: “root”, password is your admin password. (the program does not move the cursor when you enter your password, simply enter it and press enter)
- You should see “Welcome to FFP…” etc. and be logged in.
- Disable telnet for security reasons by entering:
“/ffp/start/telnetd.sh stop”
then
“chmod a-x /ffp/start/telnetd.sh” (Pasting is done in putty via left click)
- Enter:
“wget http://wolf-u.li/u/441 -O /ffp/bin/uwsiteloader.sh” (Should see “uwsiteloader.sh saved”)
then
“chmod a+x /ffp/bin/uwsiteloader.sh”
then
“uwsiteloader.sh”
- Press “Yes” to update UW Site Loader and then “OK”
- Check all sites (click with your mouse or press space to select) and press “OK” and then “OK”
3) Install ffmpeg / lame ffp packages
Run:
"slacker -ui" and:
install mz:lame-3.99.5-arm-1.txz
install uli:ffmpeg-1.2.1-arm-1.txz
4) Install Java
Source: Serviio Forum (see above) +
http://nas-tweaks.net/419/installation- ... -fun_plug/
- Go to this site:
http://www.oracle.com/technetwork/java/ ... index.html
- Accept the license agreement (by clicking the radiobutton)
- Download the following file on the site:
ejre-7u40-fcs-b43-linux-arm-sflt-headless-27_aug_2013.tar.gz
- Register for an account if needed
- Run (in PuTTy) which creates a "java" folder
mkdir -p /ffp/opt/java
- Using FileZilla upload the file to the folder you create above
- Run (in PuTTy)
cd /ffp/opt/java #Changes directory
tar xvf ejre-7u40-fcs-b43-linux-arm-sflt-headless-27_aug_2013.tar #Unzips the folder
rm ejre-7u40-fcs-b43-linux-arm-sflt-headless-27_aug_2013.tar #Removes the .tar file
!!! ln -s ejre1.7.0_40 #Creates a link to the unpacked dir !!! PROBABLY NOT NEEDED
- Using FileZilla go into the ejre1.7.0_40 folder and move all contents into the folder above (/ffp/opt/java) and then delete the ejre1.7.0_40 folder.
- Run:
chmod 777 java in /ffp/opt
echo "export PATH=/ffp/opt/java/bin:\$PATH" >> /ffp/etc/profile.d/java.sh
chmod a+x /ffp/etc/profile.d/java.sh
#Line above and below permanently puts it into the environment variables
- Download "java.sh" from "/ffp/etc/profile.d" and edit it to only include:
"export PATH=/ffp/opt/java/bin:$PATH
" and save and upload/overwrite.
- Restart your NAS
- Run (in PuTTy)
java -version #Checks if it works
Return should be = "java version "1.7.0_40""
5) Install Serviio
- Run (in PuTTy)
cd /ffp/opt #Changes directory
wget http://download.serviio.org/releases/se ... nux.tar.gz #Downloads Serviio 1.3.1
tar xfvz serviio-1.3.1-linux.tar.gz #Extracts the compressed folder
rm serviio-1.3.1-linux.tar.gz #Removes the compressed file
cd /ffp/opt/serviio-1.3.1 #Changes directory
chmod a+w library #Changes permissions
mkdir log #Creates directory
chmod a+w log #Changes permissions
chmod a+w plugins #Changes permissions
cd /ffp/opt
ln -s /ffp/opt/serviio-1.3.1 serviio
!!! mkdir /ffp/tmp !!! PROBABLY NOT REQUIRED SINCE FFP ALREADY HAS A "TMP" FOLDER, CMD NOT ENTERED
6) Make Serviio startup script
Open up "Notepad ++" and paste the following, be sure to fix EOL-Conversion, "Edit->EOL Conversion->Unix/OSX Format". Save this as "serviiod.sh" in "/ffp/start" (with FileZilla) and then run (in PuTTy) "chmod a+x serviiod.sh":
- Code:
#!/ffp/bin/sh
# FFP Startup script for Serviio
EXEC=/ffp/opt/serviio/bin/serviio.sh
PIDFILE=/var/run/serviiod.pid
JAVA_HOME=/ffp/opt/java/
OPTS=
test -x $EXEC || exit 0
case "$1" in
start)
echo "Starting Serviio"
# set required JAVA home environment variable
export JAVA_HOME
# Use the normal serviio.sh script to ensure correct environment is set up
if start-stop-daemon --start --quiet --oknodo --make-pidfile --background --pidfile $PIDFILE --exec $EXEC -- $OPTS; then
echo "OK"
else
echo "Failed"
fi
;;
stop)
echo "Stopping Serviio"
# Kill both serviio.sh script and Java process
serv_kill=`ps aux | grep serviio.sh | grep -v grep | awk '{print $2}'`
java_kill=`ps aux | grep org.serviio.MediaServer | grep -v grep | awk '{print $2}'`
if [ "$serv_kill" = "" ]; then
echo "Serviio shell is not running"
RETVAL=1
else
kill $serv_kill
RETVAL=0
fi
if [ "$java_kill" = "" ]; then
echo "Serviio Java is not running"
RETVAL=1
else
kill -9 $java_kill
RETVAL=0
fi
echo "OK"
;;
status)
serv_pid=`ps aux | grep serviio.sh | grep -v grep | awk '{print $2}'`
java_pid=`ps aux | grep java | grep -v grep | awk '{print $2}'`
if [ "$serv_pid" != "" ]; then
echo "Serviio shell (pid $serv_pid) is running"
RETVAL=0
else
echo "Serviio shell is stopped"
RETVAL=1
fi
if [ "$java_pid" != "" ]; then
echo "Serviio Java (pid $java_pid) is running"
RETVAL=0
else
echo "Serviio Java is stopped"
RETVAL=1
fi
esac
exit 0
7) Edit Serviio script (NOT the newly created script above)
- Use FileZilla and download "serviio.sh" from "/ffp/opt/serviio/bin/"
- Edit the file with Notepad ++ and find "JAVA_OPTS" and change it to:
JAVA_OPTS="-Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=$SERVIIO_HOME/library -Dserviio.fixedPointEncoders -Dserviio.defaultTranscodeFolder=/ffp/tmp -Dserviio.home=$SERVIIO_HOME"
- Find the last line that executes Java to decrease the memory and edit it to:
"$JAVA" -Xmx384M -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 $JAVA_OPTS -classpath "$SERVIIO_CLASS_PATH" org.serviio.MediaServer "$@"
- Upload the edited file and overwrite the old file (serviio.sh). You could save the original file for future reference.
7) Start Serviio
- In PuTTy run:
sh /ffp/start/serviiod.sh start
- Check that Java is running with:
ps -ef | grep serviio
- It should return:
root 2861 1 0 14:27 ? 00:00:00 /bin/sh /ffp/opt/serviio/bin/serviio.sh
root 2872 2861 3 14:27 ? 00:00:36 /ffp/opt/java//bin/java -Xmx384M -Xms20M -XX:+UseParNewGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -Djava.net.preferIPv4Stack=true -Djava.awt.headless=true -Dderby.system.home=/ffp/opt/serviio/library -Dserviio.fixedPointEncoders -Dserviio.defaultTranscodeFolder=/ffp/tmp -Dserviio.home=/ffp/opt/serviio -classpath /ffp/opt/serviio/lib/*:/ffp/opt/serviio/config org.serviio.MediaServer
- Script can be stopped with:
sh /ffp/start/serviiod.sh stop
8) Manage Serviio and add media
Source: http://www.serviio.org/component/conten ... e?id=21#q2
- Download Serviio of your choice:
http://www.serviio.org/download (ex. choose Windows if you are running in a Windows version)
(IMPORTANT! SERVER & CONSOLE NEED TO BE SAME VERSION. I.E IF YOU DOWNLOAD SERVER V.1.3.1 YOU WILL NEED CONSOLE V.1.3.1)
- Install and uncheck "Serviio Server" so you only install "Serviio Console"
- Go into the install folder of "Serviio Console" then the folder "bin" and edit the "ServiioConsole.exe.vmoptions"-file with Notepad ++, add:
-Dserviio.remoteHost=xxx.xxx.xxx.xxx
(where xxx.xxx.xxx.xxx is your NAS IP-address for ex: 192.168.1.1)
then save and exit and start the console.
You MIGHT need to press CTRL+ALT+DEL and manually close the process for the console and then start it again.
You will see if it runs if you go into the "Serviio Console" folder and then the subfolder "Log".
Start the program and go into the tab "Library" and then "Add local" using the following path (for a system using a single HDD):
/i-data/md0/yourfolder
Ex: I have all my videos in /i-data/md0/video divided into .../video/tv-shows and .../video/movies.
Those two folders (tv-shows and movies) are the ones I've added.
RECOMMENDED IN THE ORIGINAL GUIDE: Do not let the NAS generate thumbnails since it tasks the NAS too much.
Under "Status" and then "Renderer Profile" you can see your discovered devices, click where it says "Generic DLNA Profile" and select the best option suited for you (if not the default one works out). Ex. I have a F-series Samsung TV and I selected "Samsung TV / player (C/D/E/F-series).'
To enter the webinterface enter:
http://192.168.1.145:23424/mediabrowser/
you will first need to set a password in "Serviio Console" under the tab "Remote"
---
Hope it works for you as well, check it out and if you can improve this or have suggestions etc. then please let me know.
As stated in the start of this "HowTo" it is based on "DeanoX" guide for Serviio 1.1 which can be found here:
viewtopic.php?f=14&t=8933
/ TheSwede86