General NAS-Central Forums

Welcome to the NAS community
It is currently Thu May 25, 2017 4:26 pm

All times are UTC




Post new topic Reply to topic  [ 150 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next
Author Message
PostPosted: Mon Oct 07, 2013 1:32 pm 
Offline

Joined: Mon Aug 12, 2013 10:10 pm
Posts: 31
Done, got it working now, 2013-10-07.
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:
viewtopic.php?f=249&t=10881#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:
http://forum.serviio.org/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:
http://forum.serviio.org/viewtopic.php?f=14&t=8933

/ TheSwede86


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 1:43 am 
Offline

Joined: Sun Oct 27, 2013 4:10 pm
Posts: 16
Everything was going smooth until I got to the java install.
I did "mkdir /ffp/opt/java" no problem
I did "cd /ffp/opt/java" no problem
I go over to filezilla and there is not java folder created. In the admin folder I have zy-pkgs/ffp

where am I going wrong

_________________
NSA 310 500 GIGS
ffp 0.7


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 7:44 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
Should be
Code:
mkdir -p /ffp/opt/java
instead mkdir /ffp/opt/java

(mkdir -p, --parents no error if existing, make parent directories as needed)


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 9:27 am 
Offline

Joined: Sun Oct 27, 2013 4:10 pm
Posts: 16
Just a typo in my explanation, yes I did "mkdir -p /ffp/opt/java" then I "cd /ffp/opt/java" I copy and past everything.
my result is root@121-media:/ffp/opt/java# which I think means that I am able to change to this new directory, but i can't find the directory in fillezilla.

_________________
NSA 310 500 GIGS
ffp 0.7


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 10:07 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
I am not familiar with ffp-zypkg, because I am using stick version, but it should be inside /usr/local/zy-pkgs/ffp/ffproot dir.


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 7:28 pm 
Offline

Joined: Sun Oct 27, 2013 4:10 pm
Posts: 16
After hours of googling and trial and errors, and learning I manage to press on.
I used command line to upload and download stuff with psftp, great program. I after realized that I was suppose to login to filezilla using ssh....oops.
I got to the start serviio command it says "starting serviio" then "OK" I then proceed to "ps -ef | grep serviio" and this is my output:
root@121-Media:~# ps -ef | grep serviio
root 9058 3663 0 23:01 pts/0 00:00:00 grep serviio
root@121-Media:~# root@121-Media:~# ps -ef | grep serviio

not the output of the tutorial.

Error message from the console "cannot connect to serviio server, it does not seem to be running. Exiting...

_________________
NSA 310 500 GIGS
ffp 0.7


Last edited by fireman74 on Sat Nov 30, 2013 5:20 am, edited 5 times in total.

Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 9:30 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 5994
In filezilla you just see the shares, I suppose? In that case you can't see the zypkg ffp folder.

But in a quick scan to that directions I understand you only need filezilla to download a script to be able to edit it? You can install nano and edit it locally.


Top
 Profile  
 
PostPosted: Fri Nov 29, 2013 10:24 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
I would consider of using WinSCP instead filezilla. This program is pretty much intuitive, if you are windows user. It has windows explorer style file browser, internal editor, which supports linux line endings. You can associate edit command with notepad ++, if you prefer using external editor. This program uses safe SFTP-3 connection and it is suitable even for connections outside local home network. Be aware-you will have full control of system files, so anything you will mess up, it will have consequences for system behavior.


Top
 Profile  
 
PostPosted: Sat Nov 30, 2013 4:22 pm 
Offline

Joined: Sun Oct 27, 2013 4:10 pm
Posts: 16
Spent the night trying to figure this out with no luck.

I rechecked my serviiod.sh, and my serviio.sh I don't see any issues there.

Java is running

admin@121-Media:~$ java -version
java version "1.7.0_45"
Java(TM) SE Embedded Runtime Environment (build 1.7.0_45-b15, headless)
Java HotSpot(TM) Embedded Client VM (build 24.45-b08, mixed mode)
admin@121-Media:~$

Note I am running firmware 4.62 if that matters.

Ok I am going to uninstall ffp clear the settings and try again.

_________________
NSA 310 500 GIGS
ffp 0.7


Top
 Profile  
 
PostPosted: Sun Dec 01, 2013 3:35 pm 
Offline

Joined: Sun Oct 27, 2013 4:10 pm
Posts: 16
Ok, so I started from scratch. followed the directions to the T. I use putty, and to upload and download files I use command line sftp client by the putty people (that is so much cooler than filezilla). When it came time to test java I get

admin@121-Media:~$ java -version
-sh: /ffp/opt/java/bin/java: Permission denied

even as root

root@121-Media:~# java -version
-sh: /ffp/opt/java/bin/java: Permission denied
root@121-Media:~#


i tried with ffp on a stick, and as a package. I just don't get it before this I got java working now nothing

_________________
NSA 310 500 GIGS
ffp 0.7


Top
 Profile  
 
PostPosted: Sun Dec 01, 2013 7:07 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
Simply check permissions and owner:
Code:
ls -la /ffp/opt/java/bin

And correct owner if it is not root:
Code:
chown -R root:root /ffp/opt


Top
 Profile  
 
PostPosted: Sun Dec 01, 2013 7:43 pm 
Offline

Joined: Sun Oct 27, 2013 4:10 pm
Posts: 16
drwxrwxrwx 2 root root 4096 Dec 1 09:09 .
drwxrwxrwx 4 root root 4096 Dec 1 09:10 ..
-rw-r--r-- 1 root root 3420 Dec 1 09:09 java
-rw-r--r-- 1 root root 3524 Dec 1 09:09 keytool


well that's enough time spent on this, I will stick with plex for now, and revisit this sometime in the future.

_________________
NSA 310 500 GIGS
ffp 0.7


Top
 Profile  
 
PostPosted: Sun Dec 01, 2013 8:52 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
Your java binary doesn't has executable permission.
Correct this:
Code:
chmod 755 /ffp/opt/java/bin/java
then check java -version again


Top
 Profile  
 
PostPosted: Sun Dec 01, 2013 8:56 pm 
Offline

Joined: Sun Oct 27, 2013 4:10 pm
Posts: 16
YES!!!!! YOUR THE MAN!!!! Thank you, thank you, thank you.

root@121-Media:~# java -version
java version "1.7.0_45"
Java(TM) SE Embedded Runtime Environment (build 1.7.0_45-b15, headless)
Java HotSpot(TM) Embedded Client VM (build 24.45-b08, mixed mode)
root@121-Media:~#

_________________
NSA 310 500 GIGS
ffp 0.7


Last edited by fireman74 on Sun Dec 01, 2013 8:59 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Sun Dec 01, 2013 8:59 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2231
Do the same for keytool:
Code:
chmod 755 /ffp/opt/java/bin/keytool


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 150 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 68 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group