This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
install_qnap [2011/12/24 00:17] cerberus created |
install_qnap [2011/12/24 02:30] cerberus |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | EDIT: There is now a optware package available that should be alot easier to install serviio from | + | ====== 1 The Easy Way ====== |
- | Head over to http:// | + | |
- | Will keep the procedure I used below here incase anyone can't get the qpkg to work. | + | 1. Locate |
+ | 2. Download and install the JRE 6 QPKG for ARM or x86 from the link provided below. | ||
+ | ARM x19: [[http:// | ||
+ | x86: [[http:// | ||
- | Thought I should write down my success (i think now atleast) story too and maybe i will help someone out. | + | 3. Once installed, enable it from the admin backend and that's it. You can now run any types of Java apps on your NAS now but expect the performance degrades as it is NAS and not a server/pc. |
- | Note: If you get some problems I am fairly sure I wont be able to help you out since everything feels sorta unstable once you reboot, | + | 4. Download and install |
- | The biggest issues I had setting it up is that basically you can't change any base config in for example/etc/init.d/ folders and whatnot, cause the QNAP NAS will overwrite most of it with its built-in settings (probably wise to avoid support issues where people have bricked their NAS or something by scewing up the OS ) | + | ARM x19: [[http://www.multiupload.com/ |
+ | x86: [[http:// | ||
- | Anyways, what I did to get everything to run smoothly is (I might have missed a bit here and there, but bear with me): | ||
- | 0. I used most of the synology guide at http://pcloadletter.co.uk/2011/ | + | ====== 2 The Hard Way ====== |
+ | |||
+ | < | ||
+ | </note> | ||
+ | |||
+ | The biggest issues is that basically you can't change any base config in for example/etc/init.d/ folders and whatnot, cause the QNAP NAS will overwrite most of it with its built-in settings (probably wise to avoid support issues where people have bricked their NAS or something by scewing up the OS ) | ||
1. Start by installing IPKG Optware from the appliaction services/ | 1. Start by installing IPKG Optware from the appliaction services/ | ||
Line 24: | Line 31: | ||
4. make a tmp dir in /opt/tmp | 4. make a tmp dir in /opt/tmp | ||
- | | + | mkdir /opt/tmp |
| | ||
5. From [[http:// | 5. From [[http:// | ||
Line 30: | Line 37: | ||
6. Put the file somewhere on your NAS and copy it to the temp folder | 6. Put the file somewhere on your NAS and copy it to the temp folder | ||
- | | + | cp / |
| | ||
7. Download some required files in this new folder | 7. Download some required files in this new folder | ||
- | < | + | |
- | wget http:// | + | wget http:// |
- | wget http:// | + | wget http:// |
+ | |||
8. Extract all the .tar.gz files in this folder with the command | 8. Extract all the .tar.gz files in this folder with the command | ||
- | | + | tar xvzf filename.tar.gz |
| | ||
9. Install some required components through the Optware package manager, also install nano since its a better text editor than vi | 9. Install some required components through the Optware package manager, also install nano since its a better text editor than vi | ||
- | | + | ipkg install optware-devel |
- | ipkg install lame | + | ipkg install lame |
- | ipkg install nano | + | ipkg install nano |
10. Put some stuff in better places | 10. Put some stuff in better places | ||
- | | + | mv serviio-0.5.2 / |
- | mkdir /opt/java | + | mkdir /opt/java |
- | mv ejre1.6.0_21 /opt/java/ | + | mv ejre1.6.0_21 /opt/java/ |
11. Now its time to compile ffmpeg, i had to edit the config file to be able to run it on my QNAP NAS, there was some command that constantly failed (mktemp), I used the suggestion in this thread to resolve it http:// | 11. Now its time to compile ffmpeg, i had to edit the config file to be able to run it on my QNAP NAS, there was some command that constantly failed (mktemp), I used the suggestion in this thread to resolve it http:// | ||
so | so | ||
- | | + | nano / |
and make the neccesary changes according to the thread above, and incase it dies, change the line | and make the neccesary changes according to the thread above, and incase it dies, change the line | ||
- | | + | if ! check_cmd type mktemp; then |
| | ||
to | to | ||
- | | + | if true; then |
| | ||
after you done that, its time to compile ffmpeg | after you done that, its time to compile ffmpeg | ||
- | | + | cd / |
- | ./configure --arch=arm --enable-armv5te --prefix=/ | + | ./configure --arch=arm --enable-armv5te --prefix=/ |
- | make | + | |
- | make install | + | make |
+ | make install | ||
+ | | ||
Note that both configure and make take a long time to complete (like several minutes for configure and up to 20-30 minutes for make), make also shows some warnings, but its nothing to worry about, just sloppy coders | Note that both configure and make take a long time to complete (like several minutes for configure and up to 20-30 minutes for make), make also shows some warnings, but its nothing to worry about, just sloppy coders | ||
12. When that is done, you should be able to test if ffmpeg is correctly installed: | 12. When that is done, you should be able to test if ffmpeg is correctly installed: | ||
- | | + | cd /opt/bin |
- | ffmpeg | + | ffmpeg |
+ | | ||
this should hopefully generate an error that libmp3lame.so.0 could not be found (atleast it did for me), we will resolve this shortly. | this should hopefully generate an error that libmp3lame.so.0 could not be found (atleast it did for me), we will resolve this shortly. | ||
You could also try to move out of the folder /opt/bin and run ffmpeg, this should hopefully launch the old ffmpeg included on the NAS for twonkymedia. You can see that the old ones build date/time is not just today (since you just compiled the new one). The text --enable-libmp3lame should also not be present in what ffmpeg prints out when you run it if it is the old one already on the NAS. | You could also try to move out of the folder /opt/bin and run ffmpeg, this should hopefully launch the old ffmpeg included on the NAS for twonkymedia. You can see that the old ones build date/time is not just today (since you just compiled the new one). The text --enable-libmp3lame should also not be present in what ffmpeg prints out when you run it if it is the old one already on the NAS. | ||
Line 84: | Line 94: | ||
13. Now its time for some configuration | 13. Now its time for some configuration | ||
- | | + | nano / |
find the line below | find the line below | ||
- | | + | # adding Ipkg apps into system path ... |
and replace the two lines just below it with the following | and replace the two lines just below it with the following | ||
- | | + | /bin/cat / |
- | [ $? -ne 0 ] && /bin/echo " | + | [ $? -ne 0 ] && /bin/echo " |
This is to resolve a bug where the paths are added in the wrong order, refer to http:// | This is to resolve a bug where the paths are added in the wrong order, refer to http:// | ||
Line 99: | Line 109: | ||
Also add the init script execution fix from the wiki link just below the two changed lines: | Also add the init script execution fix from the wiki link just below the two changed lines: | ||
- | Code: | ||
# Patch per http:// | # Patch per http:// | ||
/bin/echo "Run Optware/ | /bin/echo "Run Optware/ | ||
Line 109: | Line 118: | ||
# Ignore dangling symlinks (if any). | # Ignore dangling symlinks (if any). | ||
#[ ! -f " | #[ ! -f " | ||
- | |||
case " | case " | ||
*.sh) | *.sh) | ||
Line 125: | Line 133: | ||
esac | esac | ||
done | done | ||
- | # End patch | + | |
14. Make a few config files in / | 14. Make a few config files in / | ||
- | | + | nano / |
- | nano / | + | |
add the following to the file | add the following to the file | ||
- | | + | #!/bin/sh |
- | #!/bin/sh | + | ldconfig /opt/lib |
- | ldconfig /opt/lib | + | export JAVA_HOME=/ |
- | export JAVA_HOME=/ | + | |
The ldconfig is so ffmpeg can find libmp3lame.so.0 later on, i also try in vain to create a environment variable for JAVA_HOME, but that will not work, dont worry though, its not needed. | The ldconfig is so ffmpeg can find libmp3lame.so.0 later on, i also try in vain to create a environment variable for JAVA_HOME, but that will not work, dont worry though, its not needed. | ||
Create the serviio daemon script | Create the serviio daemon script | ||
- | | + | nano / |
- | nano / | + | |
add the following to the file | add the following to the file | ||
- | | + | #!/bin/sh |
- | #!/bin/sh | + | |
- | + | case " | |
- | case " | + | |
- | + | stop) | |
- | stop) | + | |
echo "Stop Serviio..." | echo "Stop Serviio..." | ||
"/ | "/ | ||
;; | ;; | ||
- | + | | |
- | start) | + | start) |
# start Serviio in background mode | # start Serviio in background mode | ||
"/ | "/ | ||
echo "Start Serviio..." | echo "Start Serviio..." | ||
;; | ;; | ||
- | + | | |
- | restart) | + | restart) |
$0 stop | $0 stop | ||
sleep 1 | sleep 1 | ||
$0 start | $0 start | ||
;; | ;; | ||
- | + | | |
- | *) | + | *) |
echo " | echo " | ||
exit 1 | exit 1 | ||
;; | ;; | ||
+ | | ||
+ | esac | ||
- | esac | ||
Also make both files executable | Also make both files executable | ||
- | | + | chmod +x / |
- | chmod +x / | + | chmod +x / |
- | chmod +x / | + | |
15. Almost there now. Edit the serviio start file | 15. Almost there now. Edit the serviio start file | ||
- | | + | nano / |
- | nano / | + | |
Just before the last line of that file (that start the server), add the following | Just before the last line of that file (that start the server), add the following | ||
- | | + | LANG=en_US.UTF-8 |
- | LANG=en_US.UTF-8 | + | export LANG |
- | export LANG | + | |
I had to place that there, even tho the system has utf8 already set, serviio would ignore that and use US-ASCII anyways, if you put it there, serviio will run on UTF8 and hopefully be able to handle special characters (mine did atleast) | I had to place that there, even tho the system has utf8 already set, serviio would ignore that and use US-ASCII anyways, if you put it there, serviio will run on UTF8 and hopefully be able to handle special characters (mine did atleast) | ||
Also, on the very last line of this file, there is the actual command to start the server, at the end of this line, add a space and the character & so it reads something like below | Also, on the very last line of this file, there is the actual command to start the server, at the end of this line, add a space and the character & so it reads something like below | ||
- | | + | " |
That will make serviio actually run in the background on startup should you ever want to start it manually instead of on system start (the start script in /opt/init.d *should* already take care of this during system startup) | That will make serviio actually run in the background on startup should you ever want to start it manually instead of on system start (the start script in /opt/init.d *should* already take care of this during system startup) | ||
16. Reboot the system | 16. Reboot the system | ||
- | | + | reboot |
| | ||
17. Now hopefully everything should work, once the NAS is up, try logging in to with with putty and run ps, it should generate a list of processes with a line similar to the one below in there somewhere (the actual numbers will vary ofcourse) | 17. Now hopefully everything should work, once the NAS is up, try logging in to with with putty and run ps, it should generate a list of processes with a line similar to the one below in there somewhere (the actual numbers will vary ofcourse) | ||
Code: 4168 admin 56036 S java -Xmx384M -Djava.net.preferIPv4Stack=true | Code: 4168 admin 56036 S java -Xmx384M -Djava.net.preferIPv4Stack=true | ||
+ | |||
This means serviio is running, you should be able to check the configuration fromtend by surfing to wherever you put that in step 2 | This means serviio is running, you should be able to check the configuration fromtend by surfing to wherever you put that in step 2 | ||
also, try to run ffmpeg, the output should be something similar to below: | also, try to run ffmpeg, the output should be something similar to below: | ||
- | [/ | ||
- | | + | |
+ | |||
+ | | ||
built on Apr 13 2011 20:14:18 with gcc 4.2.3 | built on Apr 13 2011 20:14:18 with gcc 4.2.3 | ||
- | configuration: | + | configuration: |
+ | | ||
libavutil | libavutil | ||
libavcore | libavcore | ||
Line 215: | Line 228: | ||
libavfilter | libavfilter | ||
libswscale | libswscale | ||
- | Hyper fast Audio and Video encoder | + | |
- | usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... | + | usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}... |
+ | Use -h to get full help or, even better, run 'man ffmpeg' | ||
- | Use -h to get full help or, even better, run 'man ffmpeg' | ||
- | Conclusion: | + | <note tip> |
- | There is probably some security issues while running all this as admin, but I couldn' | + | |
- | Also, im gonna try to be bold and install the latest ffmpeg some day in the future (from http:// | + | |
- | All in all, I can safely say that I now know 100 why linux will never be a OS for the " | + | |
- | I had serviio up and running in 10 minutes from scratch on my windows pc. On my NAS i have spent like 3-4 days just to get it working at all, and a few more tweaking it to run correctly on startup. So i am eagerly awaiting a " | + | |
- | + | ||
- | Note that when ffmpeg is running (like when serviio adds files to the library and extracts metadata), it is almost impossible to change any settings through the configuration frontend cause it eats almost all cpu power. So if you get errors when you change something just after you have added a new folder to the library, dont worry, when serviio is done adding, you cna change config again You can also ofcourse keep trying and hope to be lucky. Also as of v 0.5.2.1 of the php frontend, you cant change anything on the presentation tab, it just reverts back to the default values. I am not sure where the error lies since there is no error reported to the frontend from serviio. | + | |
I also have not tried transcoding (i have it disabled) since I always just reencode any movie that my samsung PS50C7705 cant play (which is very few to be honest). | I also have not tried transcoding (i have it disabled) since I always just reencode any movie that my samsung PS50C7705 cant play (which is very few to be honest). | ||
- | + | </ | |
- | Ah well, regardless, it was a fun ride, and now im gonna watch some movies on my 50" samsung plasma tv. | + | |