Quick install

How make a linux jukebox (my old paper)

iTux - English - Italian

Install iSmash on iTux box

INSTALL - English

Search

 

Contribute

 

Do you want to develop iSmash? You can develop code, plugins, create theme or translate iSmash in other languages. Contact me to nixw0rm [at] gmail [dot] com

install into a linux server

iSmash version 0.1, web jukebox written in php and javascript

1 - INTRO

iSmash is a open php project useful to create LAN web jukebox. You can customize theme or extends functions simply editing his code.

Probably you are asking yourself why you need a lan jukebox... Beh, for example I want to listen music while I'm compiling kernel
or I don't want to stop music when I must reboot machine.

There is similar projects like this using ssh like mp3blaster, but if you close connection from your client, music turn off.
Using Apache by system() php function you can run 'mpg321 test.mp3 &' and close your browser: the server continues play music.

So, you need an independent jukebox that playing music without clients support..

You can also, add to queue your favourite mp3 by your iPhone or install an innovative wireless jukebox into you pub or office..

For all this, nothing is better than a linux server with Apache / php.. ;-)


iSmash is based on:

- a unix command line player like mpg321 (default), mpg123 or mplayer;

- libphplay, for manage mp3 track by Php or web page

- libphtml, for create web page using less html code (useful for theming into a web application)


For info about GNU license, read COPYING file presents in this package.


If you want to install iSmash into your server you need:

- Apache2 with php5 on a linux (tested Ubuntu and Debian);

- A sound card connected to speakers (if you have an high quality audio system is better);

- More space into your hard drive for your mp3s.

- A wireless cards if you want to manage your jukebox by iPhone or laptop

Into your client you need a browser with ajax support like firefox or safari


2 - INSTALLATION

You can install iSmash in two ways: by config script or manual



2.1 - MANUAL INSTALL

In manual setup you can follow next steps.

First, you must extract the package:

$ tar xzvf ismash-current.tar.gz

....extractions......

$ rm -f ismash-current.tar.gz

Now you must become root by 'sudo' or 'su':

$ sudo bash
Password:

You must copy ismash-current/src folder into apache root directory:

# cd ismash-current

# cp -R src /var/www/ismash

# cd /var/www/ismash

# chmod -R +rwx /var/www/ismash

Now you must configure apache to access to audio device. So we need to add apache user to 'audio' group.
We can see apache user is www-data:

# grep /var/www /etc/passwd
www-data:x:33:33:www-data:/var/www:/bin/sh

# chown -R www-data:www-data /var/www/ismash

# addgroup www-data audio
Added www-data to audio group.

Now we need a link to real mp3 folder:

# ln -s /mp3 ./music

After this we need to restart apache service:

# bash /etc/init.d/apache2 restart


Now we can try to connect to localhost with a web browser
and type

http://localhost/ismash/

and you should see your jukebox.

For advanced settings you can edit settings.inc.php file


2.1 - SCRIPT INSTALL

This method is similar previous, but you can use config.sh
to automate some operations.

Extract the package:

$ tar xzvf ismash-current.tar.gz

....extractions......

$ rm -f ismash-current.tar.gz

Now you must become root by 'sudo' or 'su':

$ sudo bash
Password:

You must copy ismash-current/src folder into apache root directory:

# cd ismash-current

# cp -R src /var/www/ismash

# chmod -R +rwx /var/www/ismash

At this point, we can run configuration script:

# cd /var/www/ismash

# ./config.sh
iSmash 0.1 Configuration script - by nixw0rm

iSmash Copyright (C) 2009 nixw0rm
This program comes with ABSOLUTELY NO WARRANTY; for details less COPYING.
This is free software, and you are welcome to redistribute it
under certain conditions; less COPYING for details.

Type 'Yes' to continue

Yes

Working dir: '/var/www/ismash'. Are you sure? (y/n): y

Next step config will ask us where are our mp3s. In this example we have tracks into /mp3 folder:

Mp3 directory: /mp3

Adding www-data to audio group..
www-data added to audio group
Configuration script terminated. Restart apache.

Now let's restart apache web server:

# bash /etc/init.d/apache2 restart
* Restarting web server apache2
... waiting apache2: [ OK ]

Now you can try to connect to localhost with a web browser to url

http://localhost/ismash/

and you should see your jukebox.

For advanced settings you can edit settings.inc.php file