Mandriva / SqueezeCenter 7 issues (may apply to other distributions) Hi All,
I ran into some problems upgrading SlimServer 6.5 to SqueezeCenter 7 on Mandriva 2007. From the results of a couple of searches here, I gather I'm not the only one. So I'll post what I ran into and how I resolved it here and hopefully a real Perl guru or a SlimDevices developer will grab this, edit it into something reasonably authoritative and post it on the Wiki. Here goes: (This assumes that you have a running installation of 6.5 If you're installing from scratch, there may be some dependencies to be taken care of. My system uses Mandriva 2007, but this general approach might be helpful for others using distributions that don't play nice - a friend has had problems with certain versions of Ubuntu, for instance. I did all this on a test environment on a VMWare virtual machine and then migrated it to my production SOHO server. (I wouldn't want to screw up and be without music and my wife's business surely wouldn't want to be without its file and network backup servers.) First I tried just upgrading the RPM version. No dice. Tried uninstalling and installing the new version via RPM. Still no good. I looked at what returned when I tried to start the server (just starting it manually as an application, so I could see what's going on in the console) I CPANed whatever Perl modules it complained about and still no joy. It became a real head-scratcher. I found a forum message that suggested trying the tarball version if the RPM version should be frustrating. The situation qualified, so I gave it a try. The tarball version turns out to have all the Perl modules built and in directories in the tarball. In theory, you just park the un-tarred directories wherever you want (/usr/local seemed reasonable to me) and you should just be able to run the server. (BTW, the address to access the server to see if it is running is http://[your localhost]:9000. - just so you don't have to search for it.) The tarball version of the server started right up for me, but when it came time to run scanner, scanner complained that Perl module ZLIB::Compress was installed but was a version that was not compatible with SqueezeCenter. The version it wanted was the same as the one installed. Most vexing. That Perl module is used by Mandriva's software installer, so disabling the one already on the machine didn't seem like a clever way to trouble shoot the problem, even on a test machine. I had a bit of a brain functionality failure and ncarver on this forum bumped me back to reality by pointing out that I should just remove the module in the SqueezeCenter directory and let scanner use the one already installed on the machine. I did as he suggested and scanner started right up. Now I needed init scripts to make the server actually run as a service and be useful. I searched around and couldn't find any pre-made init files for the tarball version. So I installed the RPM version, grabbed the init files and uninstalled the RPM version. Not pretty, but it worked. There are two config files and one init script. The global config lives at /etc/slimserver.conf. If you're upgrading, you'll want to use the one you already have. (Be sure to back it up first!) Then, there's a config file for the init script. It lives at /etc/sysconfig/squeezecenter. It sets the locations of relevant directories and the name of the user that will run SqueezeCenter. Open it up and edit it. It's pretty obvious what goes where. About that user: The user can't be root. If you're upgrading, check your users and use the one you already have, probably "slimserver". If you don't already have a user, just make a new one. Copy the format of your other system users. It doesn't need login privileges, although I gave it a login shell just so I could su to it to test starting the server by hand. Make its home directory the SqueezeCenter home directory - the one slimserver.pl lives in. Call it whatever you want. You don't need to remember its password. I should remove its login privilege now that I don't need it anymore. In the init script itself (/etc/rc.d/init.d on Mandriva), the only thing I had to do was change the name of the server executable from "squeezecenter.pl" to "slimserver.pl". I assume it's "squeezecenter" in the RPM version from which I grabbed my init script, but it's "slimserver.pl" in the tarball. That makes really only four tasks to do to install the tarball and they all turn out to be pretty easy once they're broken down. Now, su to your slimserver user and try to start the server manually from its own directory with "./slimserver.pl". See what happens and take corrective action if needed. Then try it with the arguments specified in /etc/susconfig/squeezecenter. That should start the server as a daemon. If that's fine, either kill the process and try to start the server as a service with "service squeezecenter start", as root. Or, if you are feeling lucky, don't kill the process from the last step and stop the already running process with "service squeezecenter stop" If all is well, you should see the usual Mandriva service starting and stopping messages. At his point, I packed up all the config and init files and the server directory and copied them to the appropriate locations on the production machine. (Remember to back up the originals of those config and init files!) However, the server complained mightily, looking for paths it used on the test environment. If you haven't edited any file in the server directory structure (all I had done was trash one module sub directory from the /CPAN directory) it would be easiest to simply unpack the directories' contents afresh from the original tarball. Just a suggestion. Remember once again that you'll have to edit your slimserver user's home directory to the new server directory. (You can guess why I mention this :-) To roll back out to your old server, just replace the config and init files from the backup copies you made and re-edit the user's home directory back to what it was and you should be good. On first run, scanner will re-scan your entire music collection. No problem. It just takes a few minutes. On my Mandriva 2007 production machine, the server refused to run on first try. It complained that the GD module would not load. I CPANed a new one using the command that slimserver thoughtfully offered up, but to no avail. Something was keeping the module from working. Now your method may vary, but I went to the GUI software installer in Mandriva Control Center and installed the Perl GD module from urpmi. I figured that would show me any dependencies that need to be fulfilled. I was right. It needed libGD. Once libGD was in place, everything worked like a charm. So, to make SqueezeCenter 7 work on Mandriva 2007 (and probably just about any other distribution), just use these steps. 1. If the RPM version doesn't work, use the tarball version of the server. 2. Grab the init and config files from somewhere - your old RPM version, or maybe somebody can figure out how to post them here. 3. Edit the files. 4. Make a user, and you should be just about ready to go. I had to delete the /Compress sub directory from /CPAN in my server directory structure and I had to install libGD via Mandriva's software installer. Once I figured it out, it was easy enough. (I knew I had a functioning MySQL installation, since SC 6,5 worked properly. But if you have a problem there, that's something that you can take care of from the Mandriva software installer super easily.) And if I haven't mentioned it twenty times already, back everything up before you start and plan for a rollback if you need one. That will take a lot of the anxiety out of the process. I hope this helps somebody. -Carl -- cfseibert ------------------------------------------------------------------------ cfseibert's Profile: http://forums.slimdevices.com/member.php?userid=9288 View this thread: http://forums.slimdevices.com/showthread.php?t=49345 _______________________________________________ unix mailing list [email protected] http://lists.slimdevices.com/lists/listinfo/unix
