Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: Michael Smith on August 11, 2002, 08:18:32 PM
-
Netjuke HOWTO for SME Server v. 5.5 (should be fine with 5.1.2, with version of Netjuke appropriate for PHP on 5.1.2)
DISCLAIMER: This is my first HOWTO and though I've made every effort to be thorough and careful, even doing a special SME install on a test box just for this, if you ruin your SME server I'm not responsible! If you spot any errors or have any comments please send to me at nunayer@aol.com
Why Netjuke? Why not simply stick with the MP3 Jukebox blade? Well, the Jukebox blade is great but it's slow on older server hardware and it requires a lot of thought in planning your directory structure. Netjuke uses a real, live MySQL database to store music info, so you can access your entire music collection by artist, track title, album title, genre -- or a random selection from any and all of the above. It's a really, really good set of PHP scripts and has breathed new life into my CD collection. My wife loves it … I set up a virtually silent PC in our entertainment center with a TV-out, linked into our home network and with a wireless keyboard/mouse combo, and she'd probably throw me out of the house if I told her she couldn't have her Netjuke!
The Netjuke home page:
http://netjuke.sourceforge.net
Install documentation:
http://netjuke.sourceforge.net/docs/INSTALL.txt
Read it! The developer, Stephane Daury, has done a good job of providing a quick guide and a more in-depth discussion, as well. Of course, he didn't use SME.
Discussion forum:
http://sourceforge.net/forum/forum.php?forum_id=137462
First, you must prepare your database. I recommend using PHPMyAdmin to do your database dirty work.
Install PHPMyAdmin:
http://myezserver.com/downloads/mitel/contrib/phpmyadmin-2.2.3/
(I should note that installing this on a 5.5 server upgraded from 5.1.2 crashed the server, but once it was rebooted it was fine and I was able to create the database.)
Create a database for netjuke:
Database: netjuke
Username: netjuke
Password: (MAKE UP YOUR OWN PASSWORD PLEASE!!!!)
Give the user all SQL privileges. (Anyone care to comment on what privileges are actually necessary?) At this point I reloaded SQL just to be on the safe side.
Then create an ibay from the server manager:
Information bay name: netjuke
Description: networked jukebox
Group: everyone
User access: Write=group, Read=everyone
Public access: (As you like it)
Execution of dynamic content: enabled
I recommend not setting a password on this ibay.
The next steps require either console or shell access. Personally, I use SSH Secure Shell for my non-commercial work and PuTTY when I need to do something for a client.
SSH Secure Shell:
http://oldcommerce.ssh.com
PuTTY:
http://www.chiark.greenend.org.uk/~sgtatham/putty/
You must make a choice here, as there are two versions of Netjuke depending on which version of PHP you have. SME 5.5 has PHP 4.1, so you can use the version designed for 4.1+. Adjust the following commands appropriately, if you need netjuke-1.0b14-php4.0.6.tar.gz!
From the console or shell prompt (note that you should be able to copy & paste the commands if using SSH or PuTTY):
cd /home/e-smith/files/ibays/netjuke
wget http://netjuke.sourceforge.net/files/netjuke-1.0b14-php4.1+.tar.gz
tar -xvzf netjuke-1.0b14-php4.1+.tar.gz
This will unzip all files into a subfolder called "netjuke". What we have to do now is move the contents of THAT folder into the ibay's "html" folder. Note that the "mv" command is "mv (space)(STAR)(space)(DOT)(DOT)(SLASH)html(SLASH)" which translates to "move everything, including subfolders, from THIS folder into the html folder, one level down from the parent folder of the current folder (thus the "dot dot").
cd /home/e-smith/files/ibays/netjuke/netjuke
mv * ../html/
Check to see that you can access the "netjuke" ibay from your network. If you cannot, you have a login name/password problem.
Now we're ready to run the scripts. The next step is from a web browser:
http://(YOUR SME SERVER)/netjuke/installer/installer.php
You will be asked for the name of the netjuke database you created, user, and password. You must also set up an admin login & password.
This will generate & offer to download a file named "installer.php", which you should save as "inc-prefs.php". For a reason I don't know, I was unable to save it directly into the location it needs to be in, namely, the "etc" folder under the "html" folder in the netjuke ibay. So I saved it into the "html" folder, which I was able to access easily via Network Neighborhood, then used the Linux "mv" command from the console to move inc-prefs.php to the etc. folder, like so:
cd /home/e-smith/files/ibays/netjuke/html
mv inc-prefs.php ./etc/
(Note the SINGLE dot in that command, rather than the double dot.)
According to Daury's install documentation (which, again, you definitely should read) you must now change permissions on the inc-prefs.php file and /home/e-smith/files/ibays/netjuke/html/var/data folder, making them either owned by the web server user, or world-writable (less secure.) I chose to make them world-writable because for some reason using "chown" didn't work for me. I also changed the permissions on the "music" folder, because otherwise I couldn't copy files to it!
cd /home/e-smith/files/ibays/netjuke/html/var
chmod -R 777 data
chmod -R 777 music
(I welcome comments, horrified or otherwise, on why this is a bad idea & how I should do it better. Help me make this a better HOWTO!)
cd /home/e-smith/files/ibays/netjuke/html/etc
chmod 777 inc-prefs.php
I also deleted the index.html file from the netjuke ibay, so I wouldn't get the default SME page if I neglected to specify "index.php" when logging in to the jukebox. And per Daury's documentation, I also deleted the "installer" directory for better security. WATCH OUT here as the "rm -rf" command is a good candidate for the most destructive command in Linux! If you were to do "rm -rf *" from the root of your filesystem you would destroy everything!
cd /home/e-smith/files/ibays/netjuke/html
rm -rf index.html
rm -rf installer
Now you should be able to return to your web browser and access your new Netjuke setup with the following URL:
http://(YOUR SME SERVER)/netjuke
Use the Admin function to customize. I set my Security Mode to 0.1 so I could login from anywhere but no one could create a user. I DID specify a security key. To make my Netjuke accessible to the Internet, I changed the "Web Path" and "Music Server" values to reflect my dyndns.org name, i.e. I replaced "http://192.168.1.21:80/netjuke" with "http://(MYDYNDNS).dyndns.org:80:netjuke" in the Web Path and did likewise for the "Music Server".
Now load some music: everything goes in /home/e-smith/files/ibays/netjuke/html/var/music
The great thing about Netjuke is that, in contrast to the MP3 Jukebox blade, you don't need to concern yourself with organizing your music. Just dump it into the music directory in any way that makes sense to you. Want to create subdirectories by artist? Fine. By album? Fine. One giant directory? Fine. Netjuke will sort everything out for you. Daury himself says he creates subdirectories with generic names such as MP3001, MP3002, etc. and fills them just full enough to fit on a CD-R, so it's easy for him to make backups of his music. That made sense to me but I've been too lazy to rework my subfolders from when I was using the MP3 Jukebox blade.
Once you've loaded some music, it's time to tell Netjuke what it is. Use the "Recursive File Finder"; it will go through all your music files and extract whatever information it can from ID3 tags on MP3 files.
Go back to "Browse" and enjoy.
One final note: I found that even though I used ExactAudioCopy to rip my CDs, and accessed the FreeDB database to get track names, the tags didn't really suit me. I ended up using the Dapyx MP3 Explorer to "groom" my music tags, setting genre IDs to my taste and fixing artist/title on compilation CDs, which for some reason don't usually come out right.
http://www.dapyx-soft.com
After I was finished grooming my tags, I told Netjuke to drop & reload all music info, from Admin/Music Database Maintenance/Clear All Music-Related Data. Then I re-ran the Recursive File Finder and everything was much nicer -- genres, artists, albums all cleaned up.
Thanks for paying attention all this way! I hope it worked out OK for you. Again, please send comments/flames, etc. to nunayer@aol.com (don't hold it against me that I'm using and AOL email … it comes in handy to have an email address I don't mind publicizing to the world! I get >50 pieces of spam a day at this address and <2 at my primary email …).
Regards to all and happy netjuking,
Michael Smith
-
Michael,
Nice how-to.....
I have installed Netjuke in the past and did promise someone else to create a how-to for it but you beat me to it.
As a relative newbie, I too wonder about the security of the whole thing. It would be nice if someone a little more expeienced could comment on the part about " web server user, or world-writable ".
Anyway well done.
IMHO, The BEST M3 Jukebox I've come across.
Graham
-
I have tried following your HOW-TO on twh different servers 5.1.2 + 5.5.
But when I accept the settings in installer.php I get an error saying: "Cannot connect to database using the provided information. $dbconn->PConnect".
What went wrong? phpMyAdmin spins like a charm and horde spins like a charm so MySQL should be working and I have triple checked the username and password.
TIA
Preben Østerlid
-
Preben Østerlid wrote:
>
> I have tried following your HOW-TO on twh different servers
> 5.1.2 + 5.5.
> But when I accept the settings in installer.php I get an
> error saying: "Cannot connect to database using the provided
> information. $dbconn->PConnect".
I had the same problem, I changed the DB Host (through the yourservername/netjuke/installer/installer.php script) name to the ip address of my netjuke server, which created the required file -> installer.php.
-
Thank you for the HowTo, it was very usefull when I upgraded to 5.5
-
I am using 5.5 and using the commands for 4.4---. Keep getting error. the comands do not wort. If ther is a procedure for 5.5, please advise
Thanks stan
-
How do you install jukebox with ver. 5.5.
Stan
-
how do yoy install jukebox on ver. 5.5
-
Stan, give it a rest! You've posted the same question three times in five minutes, on a thread that gives you the answer right at the top! Notice how it says "Netjuke HOWTO for SME Server v. 5.5". If there's something in particular that isn't working, post what it is and maybe somebody can help you.