bntjah / lancache

Improve download speeds and reduce strain on your Internet connection at LAN parties. Locally cache game installs and updates from the largest distributors: Steam, RIOT, Blizard, Hirez, Origin, Sony, Microsoft, Tera, GOG, ArenaNetworks, WarGaming, and Uplay. Super easy to setup with auto installer script!
175 stars 43 forks source link

Synology NAS - Setup #20

Closed Lockie85 closed 7 years ago

Lockie85 commented 7 years ago

Hi,

I have multiple PC's each with Steam (plus other launchers) and I think this awesome project can help ease my internet woes.

I own a NAS (Synology DS214play) and I'd like to setup this project on this device, allowing all PCs in the house to fetch from this local cache.

The problem is, I really don't get (understand) Linux and I'm struggling big time. I've been trying to learn bits and bobs but I REALLY don't want to make a mistake and break my NAS. So I have one or two questions I guess.

Would anyone be able to help me install this project onto my NAS with some simple guidance for a n00b (and I do mean simple, from browsing directories to installing programs). Or alternatively, do you think this sort of project could be packaged up for Synology users to install (via the synology package centre). I'm assuming the former would be much easier but I'd love to know what you guys think.

@bntjah I tried running your lc-installer but I think the install didn't go as planned. Here's the log...

sh-4.3# chmod +x installer.sh
sh-4.3# sh installer.sh
The MAC Adresses for these Interfaces are:
eth0 sit0 tun0
HIDING MAC ADDRESS, BUT IMAGINE IT'S HERE
Please Enter The Interface to Use:
The Interfaces on this machine are: eth0 sit0 tun0
eth0
You have Entered: eth0

Checking if this Interface Exists...
It seems that eth0 exists

Now Defining the necessary files
sudo: adduser: command not found
sudo: addgroup: command not found
sudo: usermod: command not found
sudo: apt-get: command not found
sudo: apt-get: command not found
Cloning into 'lancache'...
remote: Counting objects: 643, done.
remote: Total 643 (delta 0), reused 0 (delta 0), pack-reused 643
Receiving objects: 100% (643/643), 78.04 KiB | 0 bytes/s, done.
Resolving deltas: 100% (407/407), done.
Checking connectivity... done.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  867k  100  867k    0     0   689k      0  0:00:01  0:00:01 --:--:--  689k
sudo: apt-get: command not found
checking for OS
 + Linux 3.2.40 i686
checking for C compiler ... not found

./configure: error: C compiler cc is not found

sudo: make: command not found
sudo: make: command not found
mv: cannot stat ‘/usr/local/nginx/conf/nginx.conf’: No such file or directory
cp: cannot create regular file ‘/usr/local/nginx/conf/nginx.conf’: No such file or directory
mkdir: cannot create directory ‘/usr/local/nginx/conf/lancache’: No such file or directory
mkdir: cannot create directory ‘/usr/local/nginx/conf/vhosts_enabled/’: No such file or directory
cp: target ‘/usr/local/nginx/conf/lancache’ is not a directory
cp: target ‘/usr/local/nginx/conf/vhosts_enabled/’ is not a directory
cp: target ‘/etc/bind/’ is not a directory
sudo: service: command not found
sh-4.3# sudo /etc/init.d/lancache start
sudo: /etc/init.d/lancache: command not found

Any help would be greatly appreciated.

Many Thanks,

Linux n00b

drwebbe commented 7 years ago

A great idea indeed to install LC on a NAS ! Wonder if it would work on QNAP's too...

Lockie85 commented 7 years ago

Well I'm glad someone else like the idea, I wasn't sure if it was valid. But I think everyone plays games on

And most people have multiple PCs etc. all pulling the same data on their internet connections. So to me, it seems only logical :)

imac2009 commented 7 years ago

Hey there and a warm welcome for your interesst in lancache. Well to keep it simple, the error is right there - stating "./configure: error: C compiler cc is not found"

Which means, your synology is missing of compilers. Hence you need them, to compile software's source code to binarys to make them run. For desktop or server's this won't be a bit deal installing them. But in the case of a Synology - idk. I just have no hand's on a synology recently and have no idea if it's possible to get a compiling environment on it.

But - there are other ways to compile it for your machine. You probably could use cross compiling, which means, another machine on your network is doing the compile job for your nas. Unfortuneatly I don't have expierences on this and I'm pretty sure it's far away from "user friendly" to do so.

bntjah commented 7 years ago

I'm with imac2009 on this one; Synology / NAS is a bith of uncharted terroritory for me. As I run it all on a spare Linux machine I've here...

But we can go and try to figure it out together with the errors you post here...

Lockie85 commented 7 years ago

Ar ok, well I might be able to install the required compilers from the Synology community of things.

I've just installed (I think) GCC on my NAS, which (I think) should allow me to compile. But I'm still getting the error. I ran "ipkg list | grep gcc" to get GCC.

So I ran "ipkg list_installed" to check it was installed and I got the follow:

bind - 9.6.1.3-4 - Bind provides a full name server package, including zone masters, slaves, zone transfers, security multiple views.  This is THE
binutils - 2.19.1-1 - The GNU assembler and linker and related tools
gcc - 4.2.1-5 - The GNU Compiler Collection.
libc-dev - 2.3.6-5 - libc development files.
libnsl - 2.3.6-4 - Network Services Library
ncurses - 5.7-3 - NCurses libraries
openssl - 0.9.8v-2 - Openssl provides the ssl implementation in libraries libcrypto and libssl, and is needed by many other applications and librari
psmisc - 22.17-1 - A set of some small useful utilities that use the proc filesystem.
wget - 1.12-2 - A network utility to retrieve files from the Web

Looks fine to me, but the compiler isn't working for me I guess? Or have I missed a step in the GCC install and I need to do somethhing in addition to what I have?

And thanks very much for helping me :)

Lockie85 commented 7 years ago

okay, I THINK I've made some progress but I need to fix this variable: lc_bind_loc=/etc/bind

But I dont know where my bind is :(

Lockie85 commented 7 years ago

Yep I'm fully stuck! :(

However I have a feeling it wouldnt take you long to change your script for Synology machines, as it appears to only require a few tweaks by someone who knows what they're doing. That person isn't me :)

cerealcable commented 7 years ago

Would this type of effort be better collaborated using IRC or Slack or similar? Definitely not harping on anyone for using github of course, but I watch this project to keep up with it but maybe this would be best to take out so that we don't email all project watchers as well as participants of this thread? Would be neat to see this easier for those w/o Linux knowledge though.

Lockie85 commented 7 years ago

I agree with you. Sorry, I'm just not sure how to do that. Hopefully @bntjah will be back soon and can help out.

Sorry all

cerealcable commented 7 years ago

I don't mind helping out at all either, is there an irc or slack server people hang out in? I could always create a channel on freenode but not certain if there is already something.

Lockie85 commented 7 years ago

Do you mean a channel for specifically lancache chat? I doubt there is, but you could create one until someone else says otherwise :)

Lockie85 commented 7 years ago

Hey guys, I've made a slack channel which can be found here: https://lancache.slack.com/home

I've not really used slack properly before so excuse me if I'm being a n00b. I'm not sure if an invitation to join is required so let me know if you have problems and I'll try and fix it.

As a side note, I'm still stuck at getting lancache working on my NAS lol :)

deegan commented 7 years ago

The installation script expects you to run debian, or a derivative of that, which clearly the Synology NAS you are using does not. Further more I'd advice against this type of hack considering you will have to replace Apache with NGINX on your NAS and in by doing so you will need to fix access to the admin GUI yourself. There might be resources for that though I'm not sure.

My advice would be to install this on some other machine, like get and old PC and install to that. The model of Synology you mention has a fairly weak specsheet, 1GB RAM/1.6Ghz Atom CPU, which you could trump using some off-the-shelf PC parts or just getting a hold of a 1-2 year old used PC. It would be much easier too since you don't have to fiddle with the underlying, obviously limited, Linux installation on your NAS.

I tried joining your Slack but couldn't. Having set this up myself a couple of times I'm kind of aware of some of the pitfalls. The script seems to make short work of it though, your main problem will be the DNS, depending on how you run that at your place.

bntjah commented 7 years ago

@deegan isn't it possible to redirect the synology nas admin GUI to another port ? Just thinking out loud here and I do agree that its not the best option as the resources for the device are probably not on par with the requests by lancache as its best to be run on SSD's in Raid for through put to the requesting hosts...

@cerealcable this project just started as a way of manual to help the people set up lancache as it was sometimes unclear on how to do it and kind of evolved from there, but haven't really thought about an irc yet.

@all sorry was a bith on the back of my mind due to the holidays and things to do during these days so will be picking up a bith more now. Have to make some minor changes to the network I use for testing but should be done rather quickly.

Lockie85 commented 7 years ago

@bntjah Thanks for getting back to us. Have you had any thoughts on my original goal? I know the server is slightly below par in terms of power but I'd still like to try.

bntjah commented 7 years ago

@Weggy I have thought about your original goal wich is putting the lancache on the Synology but the only problem you are most likely to run into is the one @deegan referred to is beeing so that the ADMIN Gui will either be most likely broken or something else... But if you are willing to continue we can try with trial and error...

Lockie85 commented 7 years ago

@bntjah are you referencing "replace Apache with NGINX"?

If so it confused me a little bit as the Synology web station allows you to run off either, but I might be getting confused :)

bntjah commented 7 years ago

@Weggy I am mainly suggesting to actually run NGINX on port 80 and reconfigure the apache to run on port 81 or some other port then 80 or 443 as these will be used by NGINX / Sniproxy but I'm not sure how your Gui will agree to this

Lockie85 commented 7 years ago

@bntjah Ar, ok. Yea I probably don't want to break my NAS :)

bntjah commented 7 years ago

@Weggy if you don't mind I'm just gonna close this issue; since you are stating not to wanting to break your NAS and its a possibility as its uncharted territory...