Un perfetto P2P server con mldonkey

Siete stanchi di tenere il vostro PC acceso per scaricare o condividere files sui circuiti P2P? Avete un server FreeBSD sempre acceso? Ecco come trasformare il vostro fedele server in un perfetto schiavo, che esegue per voi le operazioni di ricerca e download dai circuiti P2P più gettonati, a partire da eDonkey (quello di eMule).

Attenzione: quello che trovate qui di seguito vale per FreeBSD 5.3 ma, mutato mutandis, può andar bene anche per altri BSD, o per Linux o per qualsiasi altro *nix.

Scenario: abbiamo una rete connessa ad Internet, magari attraverso un router che fa NAT e un minimo di firewalling, e un server FreeBSD sul quale vogliamo montare, come servizio, un client P2P.
L’obiettivo è quello di lasciare acceso il client P2P 24/7 (24 ore al giorno, 7 giorni alla settimana), potendolo controllare attraverso un browser, via web.
Ovviamente cercando di non trascurare gli aspetti legati alla sicurezza!

Il primo step è quello di scaricare ed installare il client core mldonkey.
Su FreeBSD è facile, bastano i seguenti comandi dati da root:

# cd /usr/ports/net/mldonkey-core
# make install

Se tutto è andato bene a questo punto mldonkey-core è installato sul server.

Pagine: 1 2 3 4 5

2 Commenti a “Un perfetto P2P server con mldonkey”

  1. Phil scrive:

    RC script for Linux

    #!/bin/sh
    #
    # MLDonkey start/stop script - (c) 2005 Maurizio Giunti
    #
    # This is free software; you can redistribute it and/or modify
    #
    ## BEGIN USER CONFIGURATION ##
    #
    # Set running directory and username (not root).
    MLDONKEYDIR=/home/donkey/.mldonkey
    USERNAME=donkey
    #
    ## END USER CONFIGURATION ##

    # Include funzioni bsd per la gestione dei servizi

    status() {
    STATUSPID=`pgrep -U donkey`
    if [ -n "$STATUSPID" ];then
    if [ `ps -p $STATUSPID | wc -l` -eq 2 ]; then
    echo “mldonkey (pid $STATUSPID) running…”
    return 1
    else
    echo “Stale PID ???”
    fi
    fi
    echo “mldonkey is not running”
    return 0
    }

    start() {
    # see if there is a mldonkey running
    status
    if [ $? = 0 ]; then
    echo “Starting mldonkey”
    cd $MLDONKEYDIR
    # Remove old servers
    rm -rf servers.ini*
    # Remove tmp files
    rm -rf *.tmp
    # Run MLDonkey
    su $USERNAME -c “nice -n 19 mlnet -daemon 2> /dev/null”
    fi
    return 0
    }

    stop() {
    STOPPID=`pgrep -U donkey`
    status
    if [ $? = 1 ]; then
    echo “Stopping mldonkey”
    kill $STOPPID
    sleep 3
    return 0
    fi
    return 1
    }

    case “$1″ in
    ’status’)
    status ;;
    ’start’)
    start ;;
    ’stop’)
    stop ;;
    ‘restart’)
    stop
    start ;;
    *)
    echo “usage $0 start|stop|restart|status”
    exit 1 ;;
    esac

    exit $?

  2. Meg scrive:

    NOTA: con le ultime versioni distribuite nei Ports, viene installato anche un ottimo script di avvio quindi alcune parti di questo post non sono più attuali.

Lascia un Commento

Devi aver fatto il login per inviare un commento