Subscribe to RSS Feed

NAS

DS101G – MLDonkey Howto

April 6, 2008 by Kode

Please note, i am not the author of the following howto, i only include it in order to hopefully help you guys out, if the author wants to get in touch to give support for this article he is more than welcome to :)

Install MLDonkey on DS101G+ – HOWTO
(and Power PC ulterior versions with luck)
Version française
Tar archives

—————————————————————

First, I remind you that download content protected by intellectual
property is baaaaaaaad. Now, let’s start.

DS101G+ is a NAS (network attached storage) using a powerpc processor
on which work a unix (linux busybox).
So, it’s possible to copy mldonkey working for PowerPC architecture
and its dependances to be able to use MLDonkey.

This tutorial has been written using a DS101G+ but its in theory possible
to do the same thing on a DS106e. You need to be someone that is not afraid
of Unix shell and can think a minimum. (a part of the tutorial have to be
adapted
if the situation needed)
Moreover, I don’t guarantee that your NAS function after these modifications
(in fact especially if you silly copy-paste the part where you have to install
the dependances)

1. Prerequired
2. Downloading
3. Dependances copy
4. Create a dedicated user (almost optionnal)
5. Configuration
6. Building MLdonkey
7. Complementary Information
8. License

###############
1. Prerequired
###############

First, access to the NAS by a shell access (SSH, telnet, etc.)
For that, there are some good tutorials on the web.

-> Google, http://nslu2-linux.org

########################
2. Downloading
########################

The full complete package (MLnet + dépendances)

wget http://nastools/mldonkey/mldonkey-2.8.2.tar.gz
tar -xzf mldonkey-2.8.2.tar.gz

Others (and most recent) files are available in :
http://nastools.free.fr/mldonkey

#############################
3. Dependances copy
#############################

Roughly, we are going to copy binary library to the linux default directories
then
to create symbolic links that allow MLDonkey to use these files.

All that things happen exclusively in /usr/lib

!! WARNING READ THIS BEFORE STARTING !!

It may be that library copying, overwrites some existing files (because
of updates or different versions of NAS)
You have especially to take care to not overwriting new versions of a
library. To know a library version, you have to see the version number in
the real file name (the one that is not a symbolic link)

To differ a symbolic link of a real file :

ls -l

lrwxrwx(…)9 00:32 libcrypto.so -> libcrypto.so.0.9.7
lrwxrwx(…)9 00:32 libcrypto.so.0 -> libcrypto.so.0.9.7
-rw-r–(…)6 05:16 libcrypto.so.0.9.7

The first 2 lignes are symbolic links and the last line is a real file.

!! WARNING READ THIS BEFORE STARTING !!

cd mldonkey-2.8.2

cp libz.so.1.2.2 /usr/lib/
ln /usr/lib/libz.so.1.2.2 /usr/lib/libz.so.1
ln /usr/lib/libz.so.1 /usr/lib/libz.so

cp libbz2.so.1.0.2 /usr/lib/
ln -s /usr/lib/libbz2.so.1.0.2 /usr/lib/libbz2.so.1.0
ln -s /usr/lib/libbz2.so.1.0 /usr/lib/libbz2.so

cp libgd.so.2.0.33 /usr/lib/
ln -s /usr/lib/libgd.so.2.0.33 /usr/lib/libgd.so.2
ln -s /usr/lib/libgd.so.2 /usr/lib/libgd.so

!! WARNING READ THIS BEFORE STARTING !!

cp libjpeg.so.62.0.0 /usr/lib/
ln -s /usr/lib/libjpeg.so.62.0.0 /usr/lib/libjpeg.so.62
ln -s /usr/lib/libjpeg.so.62 /usr/lib/libjpeg.so

cp libfreetype.so.6.3.5 /usr/lib/
ln -s /usr/lib/libfreetype.so.6.3.5 /usr/lib/libfreetype.so.6
ln -s /usr/lib/libfreetype.so.6 /usr/lib/libfreetype.so

cp libpng12.so.0.1.2.8 /usr/lib/
ln -s /usr/lib/libpng12.so.0.1.2.8 /usr/lib/libpng12.so.0
ln -s /usr/lib/libpng12.so.0 /usr/lib/libpng12.so

!! WARNING READ THIS BEFORE STARTING !!

##################################################
4. Création d’un utilisateur dédié (presque optionnel*)
###################################################

* you do as you want to do but its almost must-do !
because the shell is installed of a small partition of 30 mB
and the root directory is in this small partition

MLdonkey is user-program that can function without root rights.
So you can create a dedicated user to run the MLdonkey daemon.

First, if it not already done, you have to create a /volume1/hom directory
and mount it on /home.

mkdir -p /volume1/home
mkdir -p /home
mount -o bind /volume1/home /home

Create the mldonkey user :

adduser mlnet

Now, open a session under mlnet identity.

su mlnet

####################
5. Configuration
####################

First, run the mlnet process gived in the package.

./mlnet&

Remark : you can put mlnet anywhere you want, it is not important.
Usually, under linux personnal compiled server daemon are stocked in
/usr/local/sbin.

If it’s displayed “Core started” c’est bien. (good)

Now, we are going to allow your pc to connect to the web interface.

Kill mldonkey process : kill %1

Access to the configuration file :

vi ~/.mldonkey/downloads.ini

To use insertion mode (to write) :
(in case of cataclysm you can leave without save : )

Search allowed_ips ligne.
(you can *** the file with your hand or use : )

Complete by :

allowed_ips = [
"127.0.0.1";
"VOTRE_IP";]

You can use joker by using 255 :
ex : 192.168.0.255 <=> 192.168.0.*
255.255.255.255 <=> *.*.*.*

Save the file and leave :

Restart mldonkey : ./mlnet &
Then on your PC : http://ip_syno:4080/

####################
6. MLdonkey Building
####################

You can yourself build the last MLDonkey Version by installing a
Debian chroot jail :
http://www.nslu2-linux.org/wiki/DS101/Debian

To compile MLDonkey : http://www.debianaddict.org/article61.html
(French link but command lines can help)

################################
7. Complementary Information
################################

Library used by mlnet :

ldd /usr/sbin/mlnet

libz.so.1 => /usr/lib/libz.so.1 (0×0ffcd000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0×0ff9c000)
libgd.so.2 => /usr/lib/libgd.so.2 (0×0ff2a000)
libpthread.so.0 => /lib/libpthread.so.0 (0×0feb9000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0×0fe77000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0×0fddc000)
libpng12.so.0 => /usr/lib/libpng12.so.0 (0×0fd96000)
libm.so.6 => /lib/libm.so.6 (0×0fd01000)
libdl.so.2 => /lib/libdl.so.2 (0×0fcde000)
libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0×0fc05000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0×0fbd7000)
libc.so.6 => /lib/libc.so.6 (0×0fa78000)
/lib/ld.so.1 => /lib/ld.so.1 (0×30000000)

All library (content also symbolic links) are available there :
http://nastools.free.fr/mldonkey/mldonkey_libs.tar.gz

#############
8. License
#############

Copyright (c) CZH.
Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2
or any later version published by the Free Software Foundation;
with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Texts. A copy of the license is in fdl.txt.

ds-101g+ ds-106e ds-106 cs-406 MLdonkey Synology
Compteur gratuit

Continue Reading »
No Comments

QNAP TS-101

April 6, 2008 by admin

I bought a TS-101 a pretty long time ago, but never really used it, recently i got it back out its box and decided to have a play with it.

Before i begin id just like to say please contact me if you know any more about the QNAP TS-101, or sign up and submit an article, we are always looking for new articles.

I dont know what most people would use this for, it has a lot of useful features built in, but i decided to use it to store all my films, music, tv shows etc in a central place that could be accessed by anyone on the network.

I have a pretty large DVD collection, but i tend to leave them lying about and they get scratched, so i like to download copies of the films i own (lets face it, p2p downloads are a lot quicker and simpler than trying to rip the DVD’s yourself), which gave me a great idea, the TS-101 was a built in webserver, with PHP, i decide to download some kind of cataloguing script where i could add the movies i had on the NAS and it would grab information about it from imdb.

Which led me to 2 programs and my first issues with the TS-101, the two programs i found that would fit the bill were VCD-db from http://vcddb.konni.com/ this runs on PHP5 and supports a multitude of databases, orange isnt everybodys color (nor mine) but i think this app looks gorgeous, the other app was VideoDB from http://sourceforge.net/projects/videodb/ now this app isnt as pretty maybe, but it does have a LOT of things in its favor, it runs on PHP4 with MySQL… so whats my problem? The TS-101 Webserver has PHP4 and SQlite…

Damnit… VCD-db fills the SQlite tickbox but not the PHP4 wheres VideoDB is the opposite, so i decided to look into modding the TS-101 myself, at the time of writing, i still havent managed to get either app working on the TS-101, but i HAVE found several interesting things out.

*Update* Following the MySQL update at the bottom of this article, i have now managed to install VideoDB

First things first, connecting to the TS-101, i figured there must be some way to connect to it, after searching for a while i found reference to enabling the Telnet port by doing some MD5 hashing on blah blah blah… it didnt work, maybe i did something wrong, it doesnt really matter, what i have found is the best way is to use a firmware with the Telnet already enabled, i have uploaded 2 firmwares in the downloads section, the 2.0.0 firmware from progressive, and the Optware firmware, personally i use the Optware firmware, the packages are in the unstable status, but its so much more interesting.

To Telnet to the TS-101 i recommend using PuTTy, again you can get this from the download section, dont even bother using Windows… telnet on port 13131.

Once you are in its time to do something, lol, i found a lot of information on creating a build environment to compile new programs from http://scratchpad.wikia.com/wiki/Open_Turbostation:Software about creating a cross compiler, using cygwin, colinux, etc, but basically the easiest way to set up a uclibc build enviroment is as follows.

1) Download the tarball from here
2) Copy the tarball to a Qnap share directory (e.g. Qweb)
3) Telnet in as administrator
4) Unpack the tarball tar -xvjf ppc.rootfs.tar.bz2
5) Mount the new directory mount -t proc none loopmount/proc
6) Now log into the new filesystem chroot loopmount /bin/bash

You should now have a fully functional build environment which also includes C/C++, awk etc. This environment can now be used to build packages, with the correct shared library support. Once you have built your code, it can be used in the normal Qnap environment. Currently the Qnap runs its OS in Ram drive, so what does that mean to us? Any changes are lost at reboot! To return to the environment it is necessary relogin as administrator, navigate to the location of the dir to be loopmounted, and re-issue the mount and chroot commands.

Doing it this way i managed to get a fair amount of packages compiled, however, remember, the TS-101 is not a Dual Core processor with 2GB of memory… compiling new packages takes a while… a LONG while, up to several hours depending on the packages, and after waiting all that time, if something doesnt work quite right, its VERY frustrating, i eventually managed to get Apache2, MySQL5 and PHP5 installed after 2 days of changing configs, doing everything i could think of, and then when i tried to start Apache it said it couldnt find the libphp5.so, i checked the dir it was looking in, and it was definately there… i wanted to kill someone at this point, lol.

The alternative is Optware.. and in comparison its like heaven, lol.

To install it simply download the firmware from the downloads section, then in the QNAP web administration panel go to updating the system, update the firmware, browse for the downloaded firmware and apply it.

Once the system has rebooted, just telnet to port 13131 and you’re set, to get a list of available packages type ipkg list to install a package ipkg install to get more options type ipkg –help the only probelm is these are unstable, and not all of them work, i got nano, thttpd and php installed, however installing php-thttpd (to get thttpd with php) would not work, php-apache seemed to run but wouldnt serve php pages, so its a bit hit and miss, but its a lot more fun to play with, and hopefully these issues will be addressed at some point.

*Update: MySQL*

While looking on the yahoo group i found a way to install MySQL, so here it is.
1) Telnet to the TS-101
2) Create MySQL Share Dir: mkdir /share/HDA_DATA/MySQL
3) Link share: ln-s /share/HDA_DATA/MySQL /share/MySQL
4) chmod 777 /share/HDA_DATA/MySQL
5) Upload the MySQL Package from here to the MySQL Folder.
6) cd /share/HDA_DATA/MySQL
7) tar xf mysql-4.1.21-TS-101-v0.1.tar
8) /share/MySQL/install.sh /share/MySQL/mysql-4.1.21-TS-101.tgz /share/MySQL
9) /usr/local/mysql/mysqld.sh start
10) Try to connect MySQL /usr/local/mysql/bin/mysql mysql -u root –password=admin if it works… congrats :)

Note:
1. File path
MySQL files including execution and library files are installed into /share/MySQL/mysql
MySQl database are stored in /share/MySQL/mysqldb
2. Because the link, /usr/local/mysql will be removed after rebooting, you have to input the following command to make the mysql link after every reboot.
ln -s /share/HDA_DATA/MySQL /share/MySQL
ln -sf /share/MySQL/mysql /usr/local/mysql
/usr/local/mysql/mysqld.sh start
3. You may also start/stop MySQL through web (login as administrator):
http://IP_OF_YOUR_NAS_SERVER:6000/cgi-bin/MySQL/mysql.cgi
After rebooting every time, the following commands are needed to be input to enable the MySQL web.
ln -sf /share/MySQL/webpage /home/httpd/cgi-bin/MySQL
chmod 755 /home/httpd/cgi-bin/MySQL/mysql.cgi

Links:
http://scratchpad.wikia.com/wiki/Open_Turbostation
http://vcddb.konni.com/
http://sourceforge.net/projects/videodb/
http://www.qnap.com.tw/
http://www.nslu2-linux.org/wiki/Optware/HomePage
http://tech.groups.yahoo.com/group/OpenTurbostation
#NormalPeopleHateMe on Undernet

Continue Reading »
1 Comment