MLDonkey Forum Index
Homepage •  Bugs •  Tasks •  Patches •  SF.net Project Page •  ChangeLog •  German forum •  Links •  Wiki •  Downloads
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Precompiled Linux (Debian Etch) Mipsel/Mips binaries
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10
 
Post new topic   Reply to topic    MLDonkey Forum Index -> Alternative platforms
View previous topic :: View next topic  
Author Message
mstm
neophyte


Joined: 11 Nov 2012
Posts: 38

PostPosted: Sat Dec 01, 2012 5:06 pm    Post subject: Reply with quote

Hi, libs should not be inside other folders.
For example, make a directory "mldonkey_libs", put inside all libs and use this scripts for mlnet

Code:

LD_LIBRARY_PATH=/root/mldonkey_libs:$LD_LIBRARY_PATH
export LD_LIBRARY_PATH
./mlnet &


Please note that /root/mldonkey_libs is the directory where are libs
Back to top
View user's profile Send private message
chinaox
neophyte


Joined: 20 Dec 2011
Posts: 8

PostPosted: Sun Dec 02, 2012 9:33 am    Post subject: Reply with quote

unfortunately this doesnt work for me. There must be some tricky stuff here. I am working to compile my own version though...
Back to top
View user's profile Send private message
kraftzwerg
neophyte


Joined: 10 Dec 2012
Posts: 1

PostPosted: Mon Dec 10, 2012 2:30 am    Post subject: DNS ERROR-SOLUTION/Working Freetz mlnet installer 2012-12-11 Reply with quote

I found out what the problem with the DNS errors on the Fritzbox causes

the included librarys does not extract correctly on my fritzbox with fat32.
tar always produces an error, that it cant build symlinks.
The Problem is in Fat, which does not allow symlinks.

But i found a solution:
1. extract libraries.tar.bz2 on a full Linux installation (i used the Fritzbox Build enviroment in VirtualBox)

2. copy the files with windows to the fritzbox. (i uses filezilla on windows, pointing localy to a samba share and remotly to the fritzbox)

i think windows removes, oder ignores the symlinks and only copies the librarys, whats exactly what we want.


AUTOINSTALLER (FritzBox)
updated on 11. December 2012
I made a little Script to install the current binary to any path you want. (ok, its only a downloader and extractor, performing all actions for the first run)
This Script
- downloads and installs your preffered version of mldonkey to any path you want.
- installs the lib files into .mldonkeylibs
- builds an sh file to change the LD_LIBRARY_PATH and start mlnet. (So you have one command to start mlnet)
- sets allowed_ips and admin password
- uninstalls mldonkey from the path you submit and removes all files. (optional parameter uninstall)

so if all files are where they need to be (specially the lib files), you only have to launch the installerscript, and everything is fine on mips and mipsel boxes.
After that you can directly connect with an Webbrowser.

you need a folder called mldonkeylibs with all the extracted lib files in the same folder as install-mldonkey.sh is located until i know how to run tar xjf libraries.tar.bz2 without symlink creation, or until i upload my repacked libs.


Syntax:
It needs the platform, the version of mldonkey and the path to the final binary as parameters

./install-mldonkey.sh mipsel minimal /var/media/ftp/SYSTEM/mytarget
installs the minimal version of mldonkey to /var/media/ftp/SYSTEM/mytarget

Three folders will be created inside mytarget:
.mldonkeylibs
.mldonkey
mldonkey-distrib-3.1.3.CVS
One file will be created inside:
mlnetstart.sh

So here we go:

1. save the following code as install-mldonkey.sh to the fritzzbox

2. (this is only necessary until the lib extraction inside fritzboxes with fat system works propper.)
copy all librarys to the same Folder, into the subfolder mldonkeylibs/libraries-mld-CVS3.1.3-mips or libraries-mld-CVS3.1.3-mipsel (depending on your hardware)

if you saved install-mldonkey.sh to var/media/ftp then save the extracted library files to /var/media/ftp/mldonkeylibs/libraries-mld-CVS3.1.3-mips or libraries-mld-CVS3.1.3-mipsel
/var/media/ftp/mldonkeylibs can be deleted after installation

3. start the script

Code:

#!/bin/sh
# PROBLEMS:
# If MLD_PATH= has a / at the end (/path/), the script works with it as /path//nextdir, and not as /path/nextdir see KB06774239874 vor my workarround


# Freetz requirements:
# wget
# tar

# set MLD_DEBUG="1,2,3...";
# 1 show more echo
# 5 + dont perform any file actions (FUTURE)
MLD_DEBUG="0";

MLD_SCRIPTNAME=${0};
MLD_ARCHITECTURE=$1;
MLD_VERSION=$2;
MLD_PATH=$3;
MLD_UNINSTALL=$4;

#KB06774239874
#MLDPATH=$

MLD_PATH2=$(echo $MLD_INSTPATH |sed 's/-//g');

# Variablen abfragen
chkvars()
{
    # Variable MLD_ARCHITECTURE abfragen
    if [ "$MLD_ARCHITECTURE" != "mipsel" ];
       then
        if [ "$MLD_ARCHITECTURE" != "mips" ];
             then
             echo " ";
             echo "ERROR : Parameter ARCHITECTURE nicht gefunden";
              doku;
            exit;
          fi;
    fi;

    # Variable MLD_VERSION abfragen
    if [ "$MLD_VERSION" != "full" ];
       then
        if [ "$MLD_VERSION" != "minimal" ];
             then
              if [ "$MLD_VERSION" != "normal" ];
                   then
                    if [ "$MLD_VERSION" != "normal_gd" ];
                         then
                      echo " ";
                      echo "ERROR : Parameter VERSION nicht gefunden";
                          doku;
                        exit;
                      fi;
                fi;
          fi;
    fi;

    # Variable MLD_PATH abfragen
    if [ -d "$MLD_PATH" ];
       then
        echo " ";
      else
        echo " ";
        echo "ERROR : Parameter PATH nicht vorhanden";
        doku;
        exit;
    fi;
   
    # Variable MLD_UNINSTALL abfragen
   if [ "$MLD_UNINSTALL" = "uninstall" ];
       then
        echo "Installationsabbruch! MLDonkey wird deinstalliert";
        read -p 'Enter druecken zum fortfahren, mit STRG+C abbrechen' now;
          mldonkey_uninst;       
   fi;
}


doku()
{
    echo " ";
    echo "FALSCHE PARAMETER";
    echo "Syntax:";
   echo "$MLD_SCRIPTNAME ARCHITECTURE VERSION PATH [UNINSTALL]";
    echo "";
    echo "$MLD_SCRIPTNAME mips normal /var/media/ftp/SYSTEM/ownbins/mldonkey";
   echo "to install the normal mips version of mldonkey to /var/media/ftp/SYSTEM/ownbins/mldonkey";
    echo " ";
    echo "$MLD_SCRIPTNAME mips minimal /var/media/ftp/SYSTEM/ownbins/mldonkey";
   echo "to install the minimal mips version of mldonkey to /var/media/ftp/SYSTEM/ownbins/mldonkey";
    echo " ";
    echo " ";
    echo "##################################";
    echo "#     Parameter ARCHITECTURE     #";
    echo "##################################";
    echo "mips";
   echo "mipsel";
    echo " ";
    echo "##################################";
   echo "#       Parameter VERSION        #";
    echo "##################################";
   echo "full";
   echo "minimal";
   echo "normal";
   echo "normal_gd";
    echo " ";
    echo "##################################";
   echo "#       Parameter PATH           #";
    echo "##################################";
   echo "Der Pfad in welchen mldonkey installiert werden soll";
   echo "hier werden drei Ordner angelegt .mldonkey .mldonkeylibs und der Programmordner aus welchem mldonkey aufgerufen wird";
   echo "/home/mydir";
    echo " ";
    echo "##################################";
   echo "#     Parameter UNINSTALL        #";
    echo "##################################";
   echo "experimental. Set it to uninstall for uninstalling mlnet.";
}


mldonkeytranslate()
{
    # this replaces / by \/ in $MLD_PATH
    # translate / to \-/: (works)
    echo "s/\//\\\\\-\//g" > dummy.txt
    MLD_INSTPATH=$(echo $MLD_PATH |sed -f dummy.txt);
    if [ "$MLD_DEBUG" -ge "1" ];
        then
         echo "1 MLD_INSTPATH: $MLD_INSTPATH";
   fi;
    rm -f dummy.txt

    # translate \-/ to \/: (works)
    MLD_INSTPATH=$(echo $MLD_INSTPATH |sed 's/-//g');
    if [ "$MLD_DEBUG" -ge "1" ];
        then
         echo "2 MLD_INSTPATH: $MLD_INSTPATH";
   fi;
}

mldonkey_inst()
{

    if [ "$MLD_ARCHITECTURE" = "mips" ];
        then
        MLD_URL=http://fabtar.ygrek.org.ua/3.1.3;
        MLD_FILENAME=mldonkey-cores-3.1.3.CVS-mips-20120818.tar.bz2;
    fi   

    if [ "$MLD_ARCHITECTURE" = "mipsel" ];
        then
        MLD_URL=http://fabtar.ygrek.org.ua/3.1.3;
          MLD_FILENAME=mldonkey-cores-3.1.3.CVS-mipsel-20120818.tar.bz2;
    fi

    if [ "$MLD_DEBUG" -le "5" ];
        then
        mkdir mldonkeybuild;
          cd mldonkeybuild;
      else
        listscipped "mkdir mldonkeybuild;" "cd mldonkeybuild;";
    fi;
   
   echo " ";
   echo "---> Downloading $MLD_URL/$MLD_FILENAME";
    if [ "$MLD_DEBUG" -le "5" ];
        then
          wget $MLD_URL/$MLD_FILENAME;
      else
        listscipped "wget $MLD_URL/$MLD_FILENAME;";
    fi;       

    if [ -e "$MLD_FILENAME" ];
       then
        echo " ";
        echo "---> Entpacke $MLD_FILENAME";
        tar xjf $MLD_FILENAME;
        echo "---> Entpacke libraries.tar.bz2";
# Tar aus archiv funktioniert nicht auf fat, darum neu gepackt und bei dirty: verwendet
#        tar xjf libraries.tar.bz2

# Dirty:
          mkdir lib
        cp ../mldonkeylibs/libraries-mld-CVS3.1.3-$MLD_ARCHITECTURE/* lib/
# :Dirty
        else
        echo "mldonkey Archiv $MLD_FILENAME nicht gefunden. Breche bei tar Kommando ab";
        exit;
    fi;

    if [ -e "$MLD_VERSION/mldonkey-distrib-3.1.3.CVS" ];
       then
        echo " ";
        echo "---> Verschiebe $MLD_VERSION/mldonkey-distrib-3.1.3.CVS nach $MLD_PATH/";
        mv $MLD_VERSION/mldonkey-distrib-3.1.3.CVS $MLD_PATH/;

        echo "---> Verschiebe lib  nach $MLD_PATH/.mldonkeylibs";
        mkdir $MLD_PATH/.mldonkeylibs
        mv lib/* $MLD_PATH/.mldonkeylibs;
        mv libraries.tar.bz2 $MLD_PATH/.mldonkeylibs;
      else
        echo "tar Fehler. Datei $MLD_VERSION/mldonkey-distrib-3.1.3.CVS nicht gefunden, breche bei mv commando ab";
        exit;
   fi;

   # aufräumen
   echo " ";
    echo "---> Cleanup";
    cd ..;
    rm -r -f mldonkeybuild;
   
   
   #/var/mod/root/.mldonkey
   echo " ";
   echo "---> linking mldonkey"
   mkdir $MLD_PATH/.mldonkey;
    ln -s $MLD_PATH/.mldonkey /mod/root/.mldonkey
   

    LD_LIBRARY_PATH=$MLD_PATH/.mldonkeylibs:$LD_LIBRARY_PATH;
    export LD_LIBRARY_PATH;
   echo "---> MLnet wird gestartet";
   $MLD_PATH/mldonkey-distrib-3.1.3.CVS/./mlnet &
   echo "Warte 60 Sekunden ab mlnet Start";
   sleep 60;
}

mldonkey_buildstartscript()
{
    echo "---> Building startscript mlnetstart.sh"

    echo 'echo "Beende mlnet";' > $MLD_PATH/mlnetstart.sh;
    echo 'killall mlnet;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "10";' >> $MLD_PATH/mlnetstart.sh;
    echo 'sleep 1;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "09";' >> $MLD_PATH/mlnetstart.sh;
    echo 'sleep 1;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "08";' >> $MLD_PATH/mlnetstart.sh;
    echo 'sleep 1;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "07";' >> $MLD_PATH/mlnetstart.sh;
    echo 'sleep 1;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "06";' >> $MLD_PATH/mlnetstart.sh;
    echo 'sleep 1;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "05";' >> $MLD_PATH/mlnetstart.sh;
    echo 'sleep 1;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "04";' >> $MLD_PATH/mlnetstart.sh;
    echo 'sleep 1;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "03";' >> $MLD_PATH/mlnetstart.sh;
    echo 'sleep 1;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "02";' >> $MLD_PATH/mlnetstart.sh;
    echo 'sleep 1;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "01";' >> $MLD_PATH/mlnetstart.sh;
    echo 'sleep 1;' >> $MLD_PATH/mlnetstart.sh;
   echo 'LD_LIBRARY_PATH='$MLD_PATH'/.mldonkeylibs:$LD_LIBRARY_PATH;' >> $MLD_PATH/mlnetstart.sh;
    echo 'echo "MLnet '$MLD_VERSION' wird gestartet";' >> $MLD_PATH/mlnetstart.sh;
    echo $MLD_PATH'/mldonkey-distrib-3.1.3.CVS/./mlnet &' >> $MLD_PATH/mlnetstart.sh;
   chmod 766 $MLD_PATH/mlnetstart.sh
}


mldonkey_uninst()
{
    killall mlnet
   echo "warte 10 Sekunden";
   sleep 10;
   #   Translate $MLD_PATH to a Format suitable for setenv LD_LIBRARY_PATH=
    mldonkeytranslate;
#    LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH |sed 's/\$MLD_INSTPATH\//.mldonkeylibs://');

    # Remove ionstall Path from LD_LIBRARY_PATH
    LD_LIBRARY_PATH=$(echo $LD_LIBRARY_PATH | sed 's/$MLD_INSTPATH//g');

    if [ "$MLD_DEBUG" -ge 1 ];
       then
        echo "LD_LIBRARY_PATH= $LD_LIBRARY_PATH";
    fi;
    rm -r -f dummy.txt;
    rm -r -f /mod/root/.mldonkey;
    rm -r -f $MLD_PATH/.mldonkey;
    rm -r -f $MLD_PATH/.mldonkeylibs;
    rm -r -f $MLD_PATH/mldonkey-distrib-3.1.3.CVS;
   rm -r -f $MLD_PATH/mlnetstart.sh;
   exit;
}

mldonkey_setup()
{
    echo " ";
    echo "############################################################################################################################################# ";
   echo "Mldonkey wird konfiguriert";
   echo " ";
   echo "-> Bitte geben sie die IP Adresse des Rechners an, welcher Zugriff auf das Webinterface haben soll (die IP Adresse ihres Rechners)";
    read MLD_IP;
   echo " ";
   echo "-> Bitte geben sie das Passwort ein, mit dem sie auf das Webinterface kommen wollen:";
    read MLD_PASS;
   echo " ";
   echo "---> setze $MLD_IP als allowed_ip"
   echo " ";
   $MLD_PATH/mldonkey-distrib-3.1.3.CVS/./mldonkey_command "set allowed_ips '127.0.0.1 $MLD_IP'"; > /dev/null
   echo " ";
   echo "---> setze $MLD_PASS als Webinterface Passwort"
   echo " ";
    $MLD_PATH/mldonkey-distrib-3.1.3.CVS/./mldonkey_command useradd admin $MLD_PASS; > /dev/null
    echo "############################################################################################################################################# ";
   echo " ";
}


listscipped()
{
    echo skipped: $1;
    echo skipped: $2;
    echo skipped: $3;
    echo skipped: $4;
    echo skipped: $5;
    echo skipped: $@;
}


clear;
echo "################################";
echo "# Starte Mldonkey installation #";
echo "################################";
echo " ";

chkvars;
echo "MLDonkey $MLD_VERSION fuer $MLD_ARCHITECTURE Prozessoren wird nach $MLD_PATH installiert";
read -p 'Enter druecken zum fortfahren, mit STRG+C abbrechen' now;
mldonkey_inst;
mldonkey_buildstartscript;
mldonkey_setup;

echo " ";
echo "MLDonkey wurde bereits gestartet!";
echo "Starte jetzt einen Webbrowser auf dem Rechner $MLD_IP rufe die Seite http://IP.ADRESSE.DER.FRITZBOX:4080/ auf.";
echo "Benutzername: admin Passwort: $MLD_PASS";
echo " ";
echo "MLdonkey starten:";
echo "in das Verzeichis $MLD_PATH/ wechseln";
echo "mit dem Befehl ./mlnetstart.sh MLdonkey wieder starten";
echo " ";
echo "MLdonkey beenden:";
echo "Entweder im Webinterface, oder mit killall mlnet";
echo " ";
echo "Der Rest lässt sich im Webinterface einrichten.";
echo "Viel Spas";
#nur zur Sicherheit:
MLD_PASS="nana";
;;'
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    MLDonkey Forum Index -> Alternative platforms All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10
Page 10 of 10

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Sourceforge.net Logo