New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Running LMS on Arch based B3

A collection of tips on howto tweak your Bubba.
Post Reply
redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Running LMS on Arch based B3

Post by redw0001 »

** Please note: This is a work in progress **
Background: I decided to dedicate one of my B3s to being a music server, and as I have several Squeezeboxes LMS was my primary (only) choice without a load of new investment in network players. As the image on my B3 was so old I reviewed the options available and went with Sakaki's Arch Live-USB. Primary reason for picking Arch is that I have it running on two RPis and my iMac. Other choices are probably just as good.

These are the steps I took to getting a working system. (Note: I made the fundamental error of not writing down the steps so they are from memory. If you see something wrong please let me know.)

1: Download Sakaki's Arch Live-USB from this site: https://github.com/sakaki-/archlinux-on-b3

2: Follow the instructions documented to install it onto a USB key. Once booting OK follow the optional instructions for installing onto the B3's Internal drive. Note these are documented thoroughly in the above github page. Although I changed the host name while booting from the USB key I did no other changes. That way if I messed up the version of Arch on the internal drive I could just start again from installing it onto the internal drive.

3: Change root password

4: Update the system:
pacman -Sy
pacman -Syu

5: Change the static IP address of the LAN port from 192.168.50.1 to an address that conforms to your LAN addressing. This is done by editing /etc/systemd/network/br0.network.

6: If you do not want the dnsmasq service stop and disabled it with systemctl. My router provides all the dns and dhcp function for my LAN.
systemctl stop dnsmasq
systemctl disable dnsmasq
Restart the network with:
systemctl restart systemd-networkd.

7: Added vsftpd package to allow me to copy my media from my current PC (pacman -S vsftpd). I also added the ftp ports to Shorewall at this point. Assuming you want to allow ftp via the LAN or WAN ports on the B3 the following two lines need to be added to /etc/shorewall/rules
ACCEPT loc $FW tcp 21
ACCEPT net $FW tcp 21

This is a suitable time to add the ports LMS needs to Shorewall.
ACCEPT loc $FW tcp 3483
ACCEPT loc $FW udp 3483
ACCEPT loc $FW tcp 9000

I then restarted the Shorewall service with a
systemctl restart shorewall

8: Reboot the B3 to make sure everything was still working. Then from my iMac connected to the B3 with Filezilla and transfered a couple of files to make sure it was working.

9: Create a user to work with the B3 and add it to the sudoers file in /etc. Building the AUR package needs to be done from a normal user but the actual install that happens at the end of the script needs to be done as root so needs SUDO access. Noe: in my first attempt I did not do this so had to issue the command that failed by hand once I'd switched with SU.

10: Go to the Arch AUR (I used browser on OSX) and checked out dependencies for Logitechmediaserver and installed them using pacman. Once the dependencies are installed download the snapshot of Logitechmediaserver and then transferred it to the B3 using FTP. Note: Do NOT unpack the Logitechmediaserver file you downloaded until it is on the B3. If you unpack it then transfer it you will hit problems with CRLF characters in the PKGBUILD file at a later step.

11: Log on to the user created in step 8: and unpack the snapshot you transferred from the AUR with command tar -zxvf logitechmediaserver.tar.gz

12: Make the LMS package and install using:
makepkg -si
as detailed in https://wiki.archlinux.org/index.php/Ar ... Repository . Note: The makepkg command should not be run as root, however, the -i will install the package as the last step, if you missed the step to add your user to /etc/sudoers the install will fail. If that happens makepkg actually displays the command so you can use SU to switch to root and issue it as a command. The makepkg takes quite a long time to run, get a coffee while it is processing.

13: Finally, start and enable logitechmediaserver service with:
systemctl start logitechmediaserver
systemctl enable logitechmediaserver

14: Perform a reboot to make sure Logitechmediaserver starts automatically at boot time.

Logitechmediaserver should now be up and running and you can configure it for your music library and other settings you need.

Extras:
A: I am currently running this server only using the LAN port on the B3, if you are using the LAN and WAN ports you may need to make extra additions to Shorewall for both ports.
B: If you are streaming radio from the internet you will need to allow access to port 80. I'm not doing this but Gordon mentions it here: http://forum.mybubba.org/viewtopic.php? ... d008b9e826 (look for a post on 9th Feb 2017).

Finally, I would like to thank Sakaki and Gordon who both provided invaluable information in getting my LMS up and running in a reasonable time. I probably would have got there in the end but I'm sure they saved me hours of browsing and reading and failed attempts.
Last edited by redw0001 on 21 Feb 2017, 17:14, edited 3 times in total.
Gordon
Posts: 1461
Joined: 10 Aug 2011, 03:18

Re: Running LMS on Arch based B3

Post by Gordon »

Don't forget the forward on port 80. You'll need this for listening to internet radio.
redw0001
Posts: 96
Joined: 07 Sep 2009, 14:03

Re: Running LMS on Arch based B3

Post by redw0001 »

Gordon,
Thank you for the addition regarding port 80. I will add that, however, I've not actually done that as I was not listening to radio via the internet. Hope to complete the howto soon.
Post Reply