mardi 12 juin 2007

Magic Kurobox

Voici la solution pour fabriquer un serveur NAS qui se remplit tout seul...
Tout d'abord acheter une kurobox:



- Commencer par installer Debian sur la box:
http://www.kurobox.com/mwiki/index.php/Debian_install_french
http://www.kurobox.com/sylver/debian/debian-sarge-2.6.17.1-mh1_kuro-box-20060623.tgz
(Dans ce qui suit, la partition /mnt sera montée en /data)

+ Installer les paquets utiles suivant:
apt-get install udev module-init-tools ssh install make automake gcc g++ patch libncurses5-dev bzip2 wget par2 sqlite php5-sqlite vlc-nox ffmpeg liblivemedia-dev livemedia-utils

+ UNRAR
cd /usr/src/
wget http://files9.rarlab.com/rar/unrarsrc-3.7.6.tar.gz
tar xzf unrarsrc-3.7.6.tar.gz && rm unrarsrc-3.7.6.tar.gz && cd unrar
make -f makefile.unix && cp unrar /usr/bin

+ SAMBA
apt-get install samba

Modifier /etc/samba/smb.conf comme suit pour un accès publique sans mot de passe

[global]
security = share
guest account = fred
[data]
comment = Disque KURO

writable = yes
path = /data

public = yes


+ SERVEUR WEB
apt-get install lighttpd php5-cgi
Modifier /etc/lighttpd/lighttpd.conf comme suit :

* server.document-root = "/var/www/"
* server.port = 8080
* dans server.modules, on ajoute: "mod_fastcgi",

* à la fin du fichier, ajouter :
fastcgi.server = ( ".php" => ( "localhost" => ( "socket" => "/tmp/php-fastcgi.socket", "bin-path" => "/usr/bin/php5-cgi" ) ) )

+ PYTHON
apt-get install python python-twisted python-pyopenssl

+ HELLANZB (http://doc.ubuntu-fr.org/hellanzb)
cd /usr/src/
wget http://www.hellanzb.com/distfiles/hellanzb-0.13.tar.gz

tar xvzf hellanzb-0.13.tar.gz && cd hellanzb-0.13
python setup.py install


cp etc/hellanzb.conf.sample /usr/etc/hellanzb.conf

Modifier son fichier de configuration pour se connecter à votre serveur de newsgroup et indiquer les répertoires de travail:
diff /usr/src/hellanzb-0.13/etc/hellanzb.conf.sample /usr/etc/hellanzb.conf
/ > Hellanzb.LOG_FILE = '/var/log/hellanzb/hellanzb.log'
/ > Hellanzb.DEBUG_MODE = '/var/log/hellanzb/hellanzb-debug.log'
/> defineServer(id = 'free',
/> hosts = [ 'news.free.fr:119' ],
/> username = None, # no auth

/> password = None,
/> Hellanzb.PREFIX_DIR = '/data/'
/> Hellanzb.DEST_DIR = Hellanzb.PREFIX_DIR + 'tv/'
/> Hellanzb.UNRAR_CMD = '/usr/bin/unrar'
/> Hellanzb.PAR2_CMD = '/usr/bin/par2'
/> Hellanzb.SKIP_UNRAR = False
/> Hellanzb.XMLRPC_PASSWORD = 'kuromagic'


Créer les répertoires: "/var/log/hellanzb/", "/data/nzb/", et "/data/tv/"
leur donner comme propriétaire l'utilisateur qui lancera "hellanzb.py -D" (ici fred)

+ ZUSSAWEB:
wget http://heanet.dl.sourceforge.net/sourceforge/zussaweb/zussaweb03.tar.gz
Décompresser son contenu dans "/var/www" pour le rendre accessible depuis lighthttp

Changer son config.php pour correspondre à celle de hellanzb
$passwd = 'kuromagic';
$disk = '/data/tv';
$download_nzb_path = '/data/nzb/daemon.queue';

Vous voici aux commandes d'un petit serveur accessible comme disque réseau windows et http
Ensuite, il ne reste
plus qu'à lui mettre les nzb qui vous plaisent dans son répertoire "/nzb/daemon.queue"
Pour faciliter la chose aller faire un tour ici:
http://www.binnews.info/
http://binsearch.info/

Ensuite, on peut aussi ajouter le freeplayer, pour cela s'inspirer de ce qu'on trouve ici: http://slugplayer.free.fr/
A essayer aussi, vlc streamer: http://k3nshin.fr/dotclear/index.php/2007/10/17/94-php-vlc-streamer-v2
Seul problème, la conversion en mp2 n'est pas temps réel (enfin je pense, pas testé)

Aucun commentaire: