Difference between revisions of "SqueezeBoxServer"

From SME Server
Jump to navigationJump to search
m (Added Note box pointer to the new Logitech Media Server How-to.)
 
(23 intermediate revisions by 3 users not shown)
Line 1: Line 1:
[[Category:Howto]]
+
{{Note box|April 2016: The squeezebox server software has been renamed (yet again) to "Logitech Media Server". Also the repositories used by this How-to appear to have vanished but there is a download site. See the http://wiki.contribs.org/Logitech_Media_Server How-to for further information and installation onto SME9.1 x86_64.}}
 
+
{{Note box| This How-to is based on the forum discussion [http://forums.contribs.org/index.php/topic,45083.0.html here], until this How-to gets converted in to a contrib and has a place in the Contribs.org Bugzilla bug tracking system, please report bugs in the original forum discussion. }}
{{Note box| 8/12/2009 This How-to is under heavy edit and my be wrong. There is great risk that it will change before your very eyes until this note is removed }}
+
{{Note box| 8/12/2009 This how-to has been tested on SME8 beta 4 by omitting the sections 'Install Perl 5.10.0' and 'Patch Squeezebox server to use Perl5.10.0'.}}
 
 
 
 
 
===Description===
 
===Description===
 
Squeezebox Server is the new name for SqueezeCenter. Squeezebox Server provides streaming music to Squeezebox audio players.
 
Squeezebox Server is the new name for SqueezeCenter. Squeezebox Server provides streaming music to Squeezebox audio players.
Line 35: Line 33:
 
Documenter: [[User:Christian | Christian]] - verified procedure and initiated wiki entry
 
Documenter: [[User:Christian | Christian]] - verified procedure and initiated wiki entry
  
In addition te method of installing Perl 5.10 was provided by Michael Herger (user mherger over on the slimdevices forum).
+
In addition the method of installing Perl 5.10 was provided by Michael Herger (user mherger over on the slimdevices forum).
  
 
Testing and this how to: [[User:markleman| Mark Leman]]
 
Testing and this how to: [[User:markleman| Mark Leman]]
  
====Setup the Repository====
+
===Setup the Repository===
=====Release=====
+
====Release====
 
You should use this and only this for most installations. The other repositories are for experimentation or bleeding edge.
 
You should use this and only this for most installations. The other repositories are for experimentation or bleeding edge.
 
  db yum_repositories set squeezecenter-release repository \
 
  db yum_repositories set squeezecenter-release repository \
  BaseURL http://repos.slimdevices.com/yum/squeezecenter/release/ \
+
  BaseURL 'http://repos.slimdevices.com/yum/squeezecenter/release/' \
 
  EnableGroups no \
 
  EnableGroups no \
 
  GPGCheck no \
 
  GPGCheck no \
Line 50: Line 48:
 
  Visible no \
 
  Visible no \
 
  status disabled
 
  status disabled
=====Testing=====
+
====Testing====
 
Normally you should not bother with this unless you want bleeding edge. You can safely omit this. It is provided for reference.
 
Normally you should not bother with this unless you want bleeding edge. You can safely omit this. It is provided for reference.
 
  db yum_repositories set squeezecenter-testing repository \
 
  db yum_repositories set squeezecenter-testing repository \
  BaseURL http://repos.slimdevices.com/yum/squeezecenter/testing/ \
+
  BaseURL 'http://repos.slimdevices.com/yum/squeezecenter/testing/' \
 
  EnableGroups no \
 
  EnableGroups no \
 
  GPGCheck no \
 
  GPGCheck no \
Line 60: Line 58:
 
  Visible no \
 
  Visible no \
 
  status disabled
 
  status disabled
=====Unstable=====
+
====Unstable====
 
Normally you should not bother with this unless you want bleeding edge. You can safely omit this. It is provided for reference.
 
Normally you should not bother with this unless you want bleeding edge. You can safely omit this. It is provided for reference.
 
  db yum_repositories set squeezecenter-unstable repository \
 
  db yum_repositories set squeezecenter-unstable repository \
  BaseURL http://repos.slimdevices.com/yum/squeezecenter/unstable/ \
+
  BaseURL 'http://repos.slimdevices.com/yum/squeezecenter/unstable/' \
 
  EnableGroups no \
 
  EnableGroups no \
 
  GPGCheck no \
 
  GPGCheck no \
Line 80: Line 78:
  
  
Better give ourselves some control and open the music to the world. You will need both TCP and UDP ports at least initially. If you are concerned about security there is info in the SqueezeCenter forums that tell you precisely when each port is required.
+
Better give ourselves some control and open the music to the world. You will need both TCP and UDP ports at least initially. If you are concerned about security there is info in the squeezebox forums (http://forums.slimdevices.com/) that tell you precisely when each port is required.
 
  db configuration set squeezeboxserver service \
 
  db configuration set squeezeboxserver service \
 
  status enabled \
 
  status enabled \
Line 89: Line 87:
 
to change your install to public, either change private to public above or enter
 
to change your install to public, either change private to public above or enter
 
  db configuration setprop squeezeboxserver access public
 
  db configuration setprop squeezeboxserver access public
{{Warning box|If you choose to make Squeezebox server  public then it is highly recommened that you configure Squeezebox server to require a username and password. This can be done from Squeezebox server's Settings->Advanced tab.}}
+
{{Warning box|If you choose to make Squeezebox server  public then it is highly recommended that you configure Squeezebox server to require a username and password. This can be done from Squeezebox server's Settings->Advanced tab.}}
  
  
Line 117: Line 115:
 
check perl has installed ok with:
 
check perl has installed ok with:
 
  /usr/local/perl510/bin/perl5.10.0 -v
 
  /usr/local/perl510/bin/perl5.10.0 -v
 +
 +
Which should give the following
 +
This is perl, v5.10.0 built for i386-linux-thread-multi
 +
Copyright 1987-2007, Larry Wall
 +
Perl may be copied only under the terms of either the Artistic License or the
 +
GNU General Public License, which may be found in the Perl 5 source kit.
 +
Complete documentation for Perl, including FAQ lists, should be found on
 +
this system using "man perl" or "perldoc perl".  If you have access to the
 +
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
  
 
===Patch Squeezebox server to use Perl5.10.0===
 
===Patch Squeezebox server to use Perl5.10.0===
Line 123: Line 130:
 
  ln -s /usr/share/squeezeboxserver/CPAN/ /usr/libexec/CPAN
 
  ln -s /usr/share/squeezeboxserver/CPAN/ /usr/libexec/CPAN
  
Next 3 stages need to be repeated after any upgrade.
+
Edit first line of '''/usr/libexec/squeezeboxserver''' and '''/usr/libexec/squeezeboxserver-scanner'''  
 
 
edit first line of '''/usr/libexecsqueezeboxserver''' and '''/usr/libexecsqueezeboxserver-scanner'''  
 
 
from
 
from
 
  #!/usr/bin/perl -w
 
  #!/usr/bin/perl -w
Line 131: Line 136:
 
  #!/usr/local/bin/perl5.10.0 -w
 
  #!/usr/local/bin/perl5.10.0 -w
  
edit '''/usr/lib/perl5/vendor_perl/Slim/bootstrap.pm'''
+
Edit '''/usr/lib/perl5/vendor_perl/Slim/bootstrap.pm'''
 +
 
 +
Around line 148 find some code like
 +
# prepend our directories to @INC so we look there first.
 +
unshift @INC, @SlimINC;
  
At line 142 add
+
Add a line to change this into
@INC = grep { $_ !~ /5\.8/ } @INC;
+
  # prepend our directories to @INC so we look there first.
 +
  @INC = grep { $_ !~ /5\.8/ } @INC;
 +
  unshift @INC, @SlimINC;
  
 
===Initial Launch===
 
===Initial Launch===
To test the fist time start Squeezebox server manually
+
To test the fist time start Squeezebox server manually (beware the very long command):
  
 
  sudo -u squeezeboxserver /usr/libexec/squeezeboxserver --prefsdir=/var/lib/squeezeboxserver/prefs --logdir=/var/log/squeezeboxserver --cachedir=/var/lib/squeezeboxserver/cache --charset=utf8 --d_startup --s_stdout
 
  sudo -u squeezeboxserver /usr/libexec/squeezeboxserver --prefsdir=/var/lib/squeezeboxserver/prefs --logdir=/var/log/squeezeboxserver --cachedir=/var/lib/squeezeboxserver/cache --charset=utf8 --d_startup --s_stdout
Line 143: Line 154:
 
The debug messages should help hi-light any problems, use Ctrl-C to stop.
 
The debug messages should help hi-light any problems, use Ctrl-C to stop.
  
Start Squeezebox server as a service.
+
If that all looked ok, start Squeezebox server as a service.
 
  service squeezeboxserver start
 
  service squeezeboxserver start
  
 
Access the administration page:
 
Access the administration page:
  http://<your_SMEserver>:9000/
+
  http://your_SMEserver:9000/
  
 
===Updating===
 
===Updating===
Line 159: Line 170:
 
Once all is updated and re-patched, restart
 
Once all is updated and re-patched, restart
 
  service squeezeboxserver start
 
  service squeezeboxserver start
 +
----
 +
[[Category:Howto]]
 +
[[Category:Media Apps]]

Latest revision as of 11:13, 4 April 2016

Important.png Note:
April 2016: The squeezebox server software has been renamed (yet again) to "Logitech Media Server". Also the repositories used by this How-to appear to have vanished but there is a download site. See the http://wiki.contribs.org/Logitech_Media_Server How-to for further information and installation onto SME9.1 x86_64.


Important.png Note:
This How-to is based on the forum discussion here, until this How-to gets converted in to a contrib and has a place in the Contribs.org Bugzilla bug tracking system, please report bugs in the original forum discussion.


Important.png Note:
8/12/2009 This how-to has been tested on SME8 beta 4 by omitting the sections 'Install Perl 5.10.0' and 'Patch Squeezebox server to use Perl5.10.0'.


Description

Squeezebox Server is the new name for SqueezeCenter. Squeezebox Server provides streaming music to Squeezebox audio players.

This How-to describes the installation and updating of Squeezebox Server on SME7 Server. Please refer to SqueezeCenter's product and help pages for operation.

If you already have SqueezeCenter installed it would be advisable to follow the original How-to instructions on how to remove it first.

Links

Logitech's Squeezebox home page

http://www.logitechsqueezebox.com/

Originating discussion leading to this wiki entry

http://forums.contribs.org/index.php/topic,45083.0.html

http://forums.slimdevices.com/showthread.php?t=69507

Michael Herger how-to page

http://www.herger.net/slim/detail.php?nr=1278

Credits

This How-to is based on the SqueezeCenter How-to http://wiki.contribs.org/SqueezeCenter and the original credits still apply:

Originator: bricknell - documented his struggles and successes for others

Procedure: william_syd - initially documenting a succinct procedure

Documenter: Christian - verified procedure and initiated wiki entry

In addition the method of installing Perl 5.10 was provided by Michael Herger (user mherger over on the slimdevices forum).

Testing and this how to: Mark Leman

Setup the Repository

Release

You should use this and only this for most installations. The other repositories are for experimentation or bleeding edge.

db yum_repositories set squeezecenter-release repository \
BaseURL 'http://repos.slimdevices.com/yum/squeezecenter/release/' \
EnableGroups no \
GPGCheck no \
GPGKey http://repos.slimdevices.com/yum/squeezecenter/RPM-GPG-KEY-SqueezeCenter \
Name 'SqueezeCenter Release Repository' \
Visible no \
status disabled

Testing

Normally you should not bother with this unless you want bleeding edge. You can safely omit this. It is provided for reference.

db yum_repositories set squeezecenter-testing repository \
BaseURL 'http://repos.slimdevices.com/yum/squeezecenter/testing/' \
EnableGroups no \
GPGCheck no \
GPGKey http://repos.slimdevices.com/yum/squeezecenter/RPM-GPG-KEY-SqueezeCenter \
Name 'SqueezeCenter Branch Repository' \
Visible no \
status disabled

Unstable

Normally you should not bother with this unless you want bleeding edge. You can safely omit this. It is provided for reference.

db yum_repositories set squeezecenter-unstable repository \
BaseURL 'http://repos.slimdevices.com/yum/squeezecenter/unstable/' \
EnableGroups no \
GPGCheck no \
GPGKey http://repos.slimdevices.com/yum/squeezecenter/RPM-GPG-KEY-SqueezeCenter \
Name 'SqueezeCenter Trunk Repository' \
Visible no \
status disabled

Inform Yum

Now ensure that yum's database is updated. This is needed after any db addition/change to the yum_repositories.

signal-event yum-modify

Installation

Lets install the star attraction.

yum --enablerepo=squeezecenter-release install squeezeboxserver


Better give ourselves some control and open the music to the world. You will need both TCP and UDP ports at least initially. If you are concerned about security there is info in the squeezebox forums (http://forums.slimdevices.com/) that tell you precisely when each port is required.

db configuration set squeezeboxserver service \
status enabled \
TCPPorts 9000,3483 \
UDPPorts 9000,3483 \
access private
Important.png Note:
By default the above enables the service, opens the ports, and sets the access to private (ie. your LAN. If you wish to open this to the internet you change private to public.


to change your install to public, either change private to public above or enter

db configuration setprop squeezeboxserver access public
Warning.png Warning:
If you choose to make Squeezebox server public then it is highly recommended that you configure Squeezebox server to require a username and password. This can be done from Squeezebox server's Settings->Advanced tab.



Tell SME what we have done.

signal-event remoteaccess-update

Create a File Structure

The following is a suggestion on how to create a file structure. You can alternatively create an ibay or user for these. In christian's config for example, he has an ibay with all of his media which points SqueezeCenter and Jinzora to. However he maintains Squeezebox servers's playlists per william_syd's suggestion below.

Lets make somewhere for music and playlists.

mkdir -p /opt/squeezeboxserver/playlists
mkdir -p /opt/squeezeboxserver/music

And give squeezey ownership of the above.

chown squeezeboxserver:squeezeboxserver /opt/squeezeboxserver/playlists
chown squeezeboxserver:squeezeboxserver /opt/squeezeboxserver/music


Important.png Note:
If you use an alternate directory entry, you will need to ensure squeezebox server has permissions for that directory. For example by including it in the appropriate group assigned to an ibay.


Install Perl 5.10.0

cd /usr/local
wget http://www.herger.net/slim/perl510.tgz
tar -xzf perl510.tgz

check perl has installed ok with:

/usr/local/perl510/bin/perl5.10.0 -v

Which should give the following

This is perl, v5.10.0 built for i386-linux-thread-multi
Copyright 1987-2007, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on 
this system using "man perl" or "perldoc perl".  If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.

Patch Squeezebox server to use Perl5.10.0

ln -s /usr/local/perl510/bin/perl5.10.0 /usr/local/bin/
ln -s /usr/share/squeezeboxserver/CPAN/ /usr/libexec/CPAN

Edit first line of /usr/libexec/squeezeboxserver and /usr/libexec/squeezeboxserver-scanner from

#!/usr/bin/perl -w

to

#!/usr/local/bin/perl5.10.0 -w

Edit /usr/lib/perl5/vendor_perl/Slim/bootstrap.pm

Around line 148 find some code like

# prepend our directories to @INC so we look there first.
unshift @INC, @SlimINC;

Add a line to change this into

 # prepend our directories to @INC so we look there first.
 @INC = grep { $_ !~ /5\.8/ } @INC;
 unshift @INC, @SlimINC;

Initial Launch

To test the fist time start Squeezebox server manually (beware the very long command):

sudo -u squeezeboxserver /usr/libexec/squeezeboxserver --prefsdir=/var/lib/squeezeboxserver/prefs --logdir=/var/log/squeezeboxserver --cachedir=/var/lib/squeezeboxserver/cache --charset=utf8 --d_startup --s_stdout

The debug messages should help hi-light any problems, use Ctrl-C to stop.

If that all looked ok, start Squeezebox server as a service.

service squeezeboxserver start

Access the administration page:

http://your_SMEserver:9000/

Updating

If the administration page informs you that there is an update available then you can update. It may be advisable to stop Squeezebox Server first with

service squeezeboxserver stop

Then

yum --enablerepo=squeezecenter-release update squeezeboxserver

You will need to re-patch the three files detailed above after each update.

Once all is updated and re-patched, restart

service squeezeboxserver start