XBMC Video Server: stream/download your library contents
(2014-06-23, 19:56)sp8ced21 Wrote: Installation
Synology DSm 5.0 or Higher


Anyone following these instructions do so at your own risk, these are here a ref guide to help get this running on synology Nas.

This section contains instructions on how to install this application Synology DSm 5.0 or higher. If you're using another version of the above or a different distribution altogether you'll eventually have to adapt them slightly. The instructions assume that your shell user.
to install this you will need PUTTY and for some things you can use WinSCP instead (will give you file view)
When using Putty or WinSCP or similar programme remember username is "root" and the password is your synology admin password.

Before you begin you must complete the following setups before the server files can be installed.

also Install git server from package center by synology (do not use syno community package)

Ensure SSH is enabled this can be done via - Control Panel>>>Terminal & SNMP tick "ENABLE SSH"

1. Enable Web station - Controll Panel>>Web Services (there are two tabs at top web services and php make sure it selected on web services)
Tick ENABLE Web Station (will create folder in shared folders called "WEB"
Click "Virtual Host" under "Enable Web Station" click Create
Set "sub folder" as xbmc-video-server
Set "Hostname" as http://yourddns.example.com
Set "Port" default is 80 ( if you wish to use a different port see below step)
To have a different port enable "HTTP Service" tick "Add additional Port" and enter your prefered port number.

2. Staying in Same menu the tab at top will say "PHP Settings" select this
Ensure "Enable Cache" is ticks
Ensure "Customize PHP open_basdir" is ticked
underneath this you will see a box which will have the following or similar

Quote:/etc.defaults:/etc:/usr/syno/synoman:/tmp:/var/services/tmp:/var/services/web:/var/services/homes

click on this go to the end and paste in the following with no spaces

Quote::/dev/urandom:/root/.composer/.htaccess:/root:/usr/bin

Once done above click APPLY to save the changes.

3. Ussing Putty SSH - enter the below command

Quote:vi /etc/php/conf.d/extentions.ini

#find line ;extension = phar.so, then remove ";" then save it

(you can use WinSCP to manually navigate to this file drag it to your desktop open in word pad edit as above save and paste it back to replace original file)


Synology DSm 5.0

Run the following commands, one by one, in the exact order shown here:
(Volume - is whatever your shared volume is called in this example its volume 1)

Quote:cd /volume1/web
git clone git://github.com/Jalle19/xbmc-video-server.git
cd xbmc-video-server
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/bin/composer
php composer.phar install
./src/protected/yiic createinitialdatabase
./src/protected/yiic setpermissions

Finally, after saving the file you must restart Apache either go into Synology Web Gui and select restart or via ssh "httpd -k restart" (ive found ssh way to be hit or miss)
Update via SSH in Putty

To update your copy of the software to the latest version, run the following commands at root via ssh:

Quote:cd /your volume name/web/xbmc-video-server
git pull
php composer.phar install
./src/protected/yiic migrate --interactive=0

If you encounter the following error on trying to update
Quote:Please, commit your changes or stash them before you can merge. Aborting
then type the following command
Quote:git checkout -- /your volume name/web/xbmc-video-server
then complete the update as normal.


Once done this will give you up and running xbmc-video-server on synology, most encoutered errors are usually file permission issue so make sure you have correct file permision set for your Web folder.

This will allow for update using SSH

Setup Reverse Proxy on synology

you can use SSH and vi to accomplish this process but my preferred method is below as in my eyes it easier and more user friendly.

Using WinSCP navigate to following file in your synology root folder "httpd-vhost-user" : - /etc/httpd/sites-enabled-user/httpd-vhost.conf-user double click to open the file in notepad.

in the file you will find the following or similar

Quote:NameVirtualHost *:80
NameVirtualHost *:36331
<VirtualHost *:80>
ServerName *
DocumentRoot /var/services/web
</VirtualHost>
<VirtualHost *:36331>
ServerName *
DocumentRoot /var/services/web
</VirtualHost>
<VirtualHost *:80>
ServerName xbmc.example.net
DocumentRoot "/var/services/web/xbmc-video-server"
ErrorDocument 403 "/webdefault/sample.php?status=403"
ErrorDocument 404 "/webdefault/sample.php?status=404"
ErrorDocument 500 "/webdefault/sample.php?status=500"

</VirtualHost>


underneath the above paste in the following before </VirtualHost>:

Quote:AllowEncodedSlashes On

<Location /xbmc-vfs>
ProxyPass http://xbmc.example.com:8080/vfs
ProxyPassReverse http://xbmc.example.com:8080/vfs
RequestHeader set Authorization "Basic eGJtYzp4Ym1j"
</Location>

once entered save and restart apache or restart the entire synology diskstation.

few notes/extra comments?

mv composer.phar /usr/bin/composer

this failed so I changed it too

cp mv composer.phar /usr/bin/composer

typo here vi /etc/php/conf.d/extentions.ini

had to add :/dev/urandom:/root/.composer/.htaccess:/root:/usr/bin:/root/volume1


going to try reverse proxy next.
Reply


Messages In This Thread
RE: XBMC Video Server: stream/download your library contents - by bertybassett - 2014-08-24, 16:50
Reverse Proxy Problem - by tsthomas - 2014-10-23, 19:20
Doctor Who xmas Specials - by ZennMystic - 2015-12-31, 02:39
Logout Mark Read Team Forum Stats Members Help
XBMC Video Server: stream/download your library contents9