server "Ismo" $ uname -a Linux ismo 2.6.26-2-686 #1 SMP Thu Sep 16 19:35:51 UTC 2010 i686 GNU/Linux $ cat /etc/issue Debian GNU/Linux 5.0 \n \l Tapani Aalto 0602225 Oliver Huuhtanen 0701353 Group: LNS10C1
ToDo SSH Apache PHP MySQL PhpMyAdmin IceCast Screen Irssi
Alkuvalmistelut Järjestelmän päivitys # apt-get update # apt-get upgrade Käyttäjien luonti # useradd -m tapani # useradd m oliver # passwd tapani # passwd oliver
SSH Asennus: # apt-get install ssh Estä root käyttäjän kirjautuminen: # nano /etc/ssh/sshd_config # Authentication: # LoginGraceTime /etc/init.d/ssh 120 reload PermitRootLogin yes StrictModes yes # Authentication: LoginGraceTime 120 PermitRootLogin no StrictModes yes
ToDo SSH Apache PHP MySQL PhpMyAdmin IceCast Screen Irssi
Apache Asennus: # apt-get install apache2 Omat web kansiot käyttäjille: $ mkdir /user/tapani/public_html $ mkdir /user/oliver/public_html # ln -s /etc/apache2/mods-available/userdir.conf /etc/apache2/mods-enabled/userdir.conf # /etc/init.d/apache2 restart
ToDo SSH Apache PHP MySQL PhpMyAdmin IceCast Screen Irssi
PHP Asennus: # apt-get install php5 # apt-get install php5-cli Testaus: # php -v PHP 5.2.6-1+lenny9 with Suhosin-Patch 0.9.6.2 (cli) (built: Aug 4 2010 03:25:57) Copyright (c) 1997-2008 The PHP Group Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies # echo '<?php phpinfo();?>' > /var/www/phpinfo.php
ToDo SSH Apache PHP MySQL PhpMyAdmin IceCast Screen Irssi
MySQL Asennus: # apt-get install mysql-server Ylläpitäjän salasana: # mysqladmin -u root password salasana
ToDo SSH Apache PHP MySQL PhpMyAdmin IceCast Screen Irssi # mysql -u root -p mysql> show databases; +--------------------+ Database +--------------------+ information_schema mysql +--------------------+ 2 rows in set (0.00 sec)
PhpMyAdmin Asennus: # apt-get install phpmyadmin PhpMyAdmin on nyt käytettävissä: http://192.168.10.167/phpmyadmin/
ToDo SSH Apache PHP MySQL PhpMyAdmin IceCast Screen Irssi
IceCast
IceCast Asennus: # apt-get install icecast2 Salasanat: # nano /etc/icecast2/icecast.xml <authentication> <!-- Sources log in with username 'source' --> <source-password>hackme</source-password> <!-- Relays log in username 'relay' --> <relay-password>hackme</relay-password> <!-- Admin logs in with the username given below --> <admin-user>admin</admin-user> <admin-password>hackme</admin-password> </authentication>
IceCast Automaattinen käynnistys: # nano /etc/default/icecast2 # Edit /etc/icecast2/icecast.xml and change at # least the passwords. # Change this to true when done to enable the # init.d script ENABLE=true Käynnistetään IceCast: # /etc/init.d/icecast2 start
IceCast Web-hallintapaneeli: http://192.168.10.167:8000/
IceCast
IceGenerator Kotisivut http://www.becrux.com/index.php?page=projects&name=icegenerator "IceGenerator is a direct streaming generator for Icecast/Shoutcast. It runs as a daemon. Three child processes handle all the stuff. A fourth (optional) child cares about telnet communication. Main idea for this program is radio automation on a Icecast/Shoutcast server." Ladataa paketti # wget http://www.becrux.com/pages/projects/icegenerator/icegen erator-0.5.5-pre2.tar.gz Muita tarvittavia paketteja: id3lib, libshout, libvorbis-1.3.1
IceGenerator Puretaan ladattu paketti # tar -xzf icegenerator-0.5.5-pre2.tar.gz Asennetaan # cd icegenerator-0.5.5-pre2 #./configure # make # make install
IceGenerator Radiokanavan asetukset $ nano ~/radioconfig Käyttäjille mp3 kansiot $ mkdir ~/radio Radion käynnistys $ icegenerator -f ~/radioconfig Testaus $ ps -A grep ice 2974? 00:02:09 icecast2 15816? 00:00:00 icegenerator SERVER=2 MOUNT=/tapsa #user SOURCE=source PASSWORD=hackme #playlist FORMAT=1 MP3PATH=pth:/home/tapani/radio/ RECURSIVE=1 DUMPFILE= LOOP=1 SHUFFLE=0 #information NAME=Ismo Streaming Server GENRE= DESCRIPTION= URL=http://192.168.10.167:8000/tapsa BITRATE=48000 PUBLIC=0 METAUPDATE=5 #MDFPATH=/mypath/global.mdf #logging LOG=2 LOGPATH=/var/log/icegenerator.log #telnet #DATAPORT=8796
IceGenerator Kanava hallintapaneelissa http://192.168.10.167:8000/
IceCast
Musiikit palvelimelle -> SSH
ToDo SSH Apache PHP MySQL PhpMyAdmin IceCast Screen Irssi
Screen + Irssi Asennus: # apt-get install irssi # apt-get install screen
ToDo SSH Apache PHP MySQL PhpMyAdmin IceCast Screen Irssi
Lopullinen järjestelmä Käyttöjärjestelmä Web-palvelin PHP Debian 5.0.6 Lenny Apache 2.2.9 PHP 5.2.6-1+lenny9 Tietokantapalvelin Hallintapaneeli MySQL 5.0.51a phpmyadmin 2.11.8.1 SSH-palvelin Openssh-server 5.1p1 Nettiradiopalvelin Nettiradio "generaattori" IceCast 2.3.2 IceGenerator 0.5.5-pre2 IRC -asiakasohjelma Irssi 0.8.12