Sunday, December 2, 2012

Install jDownloader on Synology NAS

Well, These are the steps I've followed to run jdownlodaer into my ds1812+, please understand my poor english :mrgreen: 

** Install bootstap: just follow these steps from viewtopic.php?f=77&t=48780

1: If you havent enabled ssh earlier, do so in «ControlPanel--->Terminal» and check «Enable SSH service»

2: Connect to youre NAS over SSH (terminal in mac/linux or Putty for Windows) as «root». The password is the same as for «admin»

3: Change to the folder «/volume1/»

4: Download the bootstrap for intel based NAS by typing:
«wget http://ipkg.nslu2-linux.org/feeds/optwa ... 7_i686.xsh»

5: Make the file runable by typing «chmod +x syno-i686-bootstrap_1.2-7_i686.xsh

6: Run it: «sh syno-i686-bootstrap_1.2-7_i686.xsh»

7: Then its finished, change to / by typing «cd /» and then make an symlink by typing «ln -s /volume1/@optware /opt»


8: Use the «vi» editor to edit the file «/etc/profile» («vi /etc/profile») and check that «PATH=/opt/bin:/opt/sbin:$PATH» is in the file. If not, add it to the end of the file. Save and quit «vi»

9: Use «vi» again to edit the file «/root/.profile» («vi /root/.profile») and add and # on the following lines:

#PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin
#export PATH

10: Reboot youre NAS by typing «reboot»

11: After the NAS have started, ssh to it again.

** Install chroot debian: You need one debian virtual machine to create the chroot environment, commands with VM prefix belong to Virtual Machine, commands with SN belong to SyNology and commands with DB belong to debian:

1.- Create the folders for the environment:
VM$ mkdir -p /var/tmp/chroottarget
SN$ mkdir -p /volume1/debian

2.- Download bootstrap and install it:
VM$ wget http://ftp.es.debian.org/debian/pool/ma ... 42_all.deb
VM$ dpkg -i debootstrap_1.0.42_all.deb

3.- Download debian environment:
VM$ debootstrap --foreign --arch amd64 squeezey chroottarget "http://ftp.es.debian.org/debian"

4.- Compress it and copy into your synology:
VM$ tar -czf chroottarget.tar.gz chroottarget

5.- Uncompress it:
SN$ tar -xzf chroottarget.tar.gz

6.- Configure it:
SN$ cp /etc/resolv.conf /volume1/debian/etc
SN$ echo `hostname` > /volume1/debian/etc/hostname
SN$ mount -o bind /proc /volume1/debian/proc

7.- Jump into the jail :)
SN$ chroot debian /bin/bash
SN$ echo "deb ftp://ftp.es.debian.org/debian stable main contrib non-free" > /etc/apt/sources.list
SN$ apt-get update

** Install VNC and JDownloader

1.- Install and configure VNC server:
DB$ apt-get install vnc4server
DB$ vnc4server

2.- Install java:
DB$ apt-get install openjdk-6-jre

3.- Download and run jdownloader:
DB$ wget http://installer.jdownloader.org/jd_unix_0_9.sh
DB$ chmod +x jd_unix_0_9.sh
DB$ ./jd_unix_0_9.sh

4.- Access to jdowloader via vnc client and activate web mode (if you want...)

5.- Enjoy!!!!

---------------------------

If your nas doesn't has a x86 proccesor, you have to do this after you copy your debian from your virtual machine to your nas
Code: Select all

chroot debian /debootstrap/debootstrap --second-stage

2 comments:

FlohEinstein said...

Thanks a lot for your post, I used it to write my own howto to install Ubuntu on diskstation, see here

Blogger said...

BlueHost is definitely one of the best web-hosting provider for any hosting plans you require.