I have successfully built and am running the latest 7.9 nightly (1438870722) in a FreeBSD jail on FreeNAS FreeNAS-9.3-STABLE-201506292332 on an HP Microserver Gen8 with 10GB RAM, a 16GB flash drive, a 120GB Samsung SSD and 4 x 4TB WD Red HDs.
My goal was to have 10TB+ of lz4 storage for media and run LMS on the SSD. FreeNAS boots from the flash drive installed in the internal USB port, the SSD uses the ODD bay and SATA connector and the WD Reds are in the 4 drive trays.
I struggled with getting LMS to build working from the information in this thread and tried at least a half dozen times before I found the path. The following commands are exactly what I used as I went through the process successfully. You will have to adapt them to your directory/storage structures as appropriate. The key to getting it working was making sure the symbolic links to perl/perl5 were done/redone in both jails.
Create two jails: one to build LMS and one to run it. Use Advanced mode, enter the IPv4 default gateway and check VIMAGE.
In build_LMS jail:
In FreeNAS shell:Code:pkg update pkg upgrade pkg install bash pkg install gmake pkg install rsync pkg install nasm pkg install wget pkg install libgd mkdir /tmp/LMS cd /tmp/LMS wget http://downloads.slimdevices.com/nightly/7.9/sc/292fd1e/logitechmediaserver-7.9.0-1438870722.tgz tar xf logitechmediaserver-7.9.0-1438870722.tgz git clone https://github.com/Logitech/slimserver-vendor -b public/7.9 ln -s -f /usr/local/bin/perl5.20.2 /usr/bin/perl ln -s -f /usr/local/bin/perl5.20.2 /usr/bin/perl5 cd /tmp/LMS/slimserver-vendor/CPAN ./buildme.sh | tee /tmp/LMS/buildme.sh.log cd /tmp/LMS/logitechmediaserver-7.9.0-1438870722/CPAN/arch/5.20 cp -Rp /tmp/LMS/slimserver-vendor/CPAN/build/arch/5.20/amd64-freebsd-thread-multi . rm -rf i386-linux-thread-multi rm -rf i386-linux-thread-multi-64int rm -rf x86_64-linux-thread-multi cd .. rm -rf 5.8 rm -rf 5.10 rm -rf 5.12 rm -rf 5.14 rm -rf 5.16 rm -rf 5.18 cd /tmp/LMS tar cf logitechmediaserver-7.9.0-1438870722_with_fbsd.tar logitechmediaserver-7.9.0-1438870722
In LMS jail:Code:cp /mnt/SSD/jails/build_jail/tmp/LMS/logitechmediaserver-7.9.0-1438870722_with_fbsd.tar /mnt/SSD/jails/LMS/tmp
I created an additional storage source /mnt/SSD/lms_data with destination /mnt/lmsdata and set permissions:Code:pkg update pkg upgrade pw groupadd -n lms -g 30001 pw useradd -n lms -u 30001 -g lms -s /usr/sbin/nologin -c "Logitech Media Server" -d /nonexistent mkdir /usr/local/lms tar xf /tmp/logitechmediaserver-7.9.0-1438870722_with_fbsd.tar -C /usr/local/lms mv /usr/local/lms/logitechmediaserver-7.9.0-1438870722/* /usr/local/lms rmdir /usr/local/lms/logitechmediaserver-7.9.0-1438870722 chown -R lms:lms /usr/local/lms rm /usr/bin/perl rm /usr/bin/perl5 ln -s -f /usr/local/bin/perl5.20.2 /usr/bin/perl ln -s -f /usr/local/bin/perl5.20.2 /usr/bin/perl5
Create startup file: lmsCode:chown -R lms:lms /mnt/lms_data/cache chown -R lms:lms /mnt/lms_data/prefs
This is trickier than it looks because it can't have any extra white space. I suggest getting it here:
http://pastebin.com/download.php?i=jtuvqvEJ
Follow the instructions in the file.
Restart your jail and try to connect to http://yourjailIP:9000Code:mv lms /usr/local/etc/rc.d/ chown root:wheel /usr/local/etc/rc.d/lms chmod 555 /usr/local/etc/rc.d/lms echo 'lms_enable="YES"' >> /etc/rc.conf echo 'lms_cachedir="/mnt/lms_data/cache"' >> /etc/rc.conf echo 'lms_prefsdir="/mnt/lms_data/prefs"' >> /etc/rc.conf echo 'lms_playlistdir="/mnt/Playlists"' >> /etc/rc.conf
Results 1 to 10 of 79
Hybrid View
-
2015-08-11, 19:02 #1
How to: Installing LMS 7.9 nightly in a FreeBSD jail on FreeNAS 9.3
Home: Win7Pro(x64)[3.3Ghz i5, 8GB RAM, 120GB SSD system, 15TB storage], LMS 7.9.0 -> Logitech Squeezebox Classic V.3 -> Cambridge Audio DacMagic -> NAD C160 -> 2 x NAD C272 -> Quad 22L2
Portable: FreeNAS 9.3 [HP Microserver Gen8, 10GB RAM, 16GB flash boot, 120GB SSD for LMS 7.9.0 in FreeBSD jail, 5 x 4TB WD Red HD ZFS RAIDZ1] -> Logitech Squeezebox Classic V.3 -> Cambridge Audio DacMagic: XLR out -> Soundmaster Diamond 12-2 mixing board -> P.A.
-
2015-08-25, 06:46 #2
- Join Date
- Aug 2012
- Location
- Austria
- Posts
- 1,129
While I have no clue about FreeBSD, I'm not convinced this is a good idea:
It seems you are overwriting the system perl, which could result in a number of problems (both in operation and when the system perl is upgraded)
You could have a look at the howto mentioned in my signature for a different approach (just don't build your own perl, use the one in /usr/local)Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
-
2015-08-26, 18:40 #3Home: Win7Pro(x64)[3.3Ghz i5, 8GB RAM, 120GB SSD system, 15TB storage], LMS 7.9.0 -> Logitech Squeezebox Classic V.3 -> Cambridge Audio DacMagic -> NAD C160 -> 2 x NAD C272 -> Quad 22L2
Portable: FreeNAS 9.3 [HP Microserver Gen8, 10GB RAM, 16GB flash boot, 120GB SSD for LMS 7.9.0 in FreeBSD jail, 5 x 4TB WD Red HD ZFS RAIDZ1] -> Logitech Squeezebox Classic V.3 -> Cambridge Audio DacMagic: XLR out -> Soundmaster Diamond 12-2 mixing board -> P.A.
-
2015-08-28, 18:28 #4
Thanks get.amped, I used your method and all is working well. My library is mostly FLAC but I did have to install the FAAD port to get any m4a tracks to transcode and play.
It runs fast and smooth - so much better than trying to run in a virtualbox jail.
What will be required to keep LMS updated?Last edited by pufnstuf; 2015-08-28 at 18:29. Reason: additional question
-
2015-08-28, 18:44 #5
I have had that same question
It should be a reduced set of the same instructions. First take a snapshot of your jails so you can revert back to them if everything goes horribly wrong. Then, in the build jail, wget the nightly, git the source, run buildme.sh, clean up the unneeded versions, tar it, cp it to the LMS jail, untar it and mv the files into usr/local/lms.
At least that's what I'm going to try when I want to get a more recent nightly. Anyone with more Linux skills than I please chime in if there's a better/easier way.
And I didn't even think about the FAAD port for m4a tracks. I don't have many (and almost never play them anyway) but I should probably go ahead and do that as well.Home: Win7Pro(x64)[3.3Ghz i5, 8GB RAM, 120GB SSD system, 15TB storage], LMS 7.9.0 -> Logitech Squeezebox Classic V.3 -> Cambridge Audio DacMagic -> NAD C160 -> 2 x NAD C272 -> Quad 22L2
Portable: FreeNAS 9.3 [HP Microserver Gen8, 10GB RAM, 16GB flash boot, 120GB SSD for LMS 7.9.0 in FreeBSD jail, 5 x 4TB WD Red HD ZFS RAIDZ1] -> Logitech Squeezebox Classic V.3 -> Cambridge Audio DacMagic: XLR out -> Soundmaster Diamond 12-2 mixing board -> P.A.
-
2015-08-29, 08:05 #6
- Join Date
- Aug 2012
- Location
- Austria
- Posts
- 1,129
You only need to do the build step if the version of one of the binary CPAN modules changes, which happens very rarely (< once a year), so you can nearly always skip this step
Getting the nightly and checking out is also unnecessary, one of the two is enough. Keeping the checked out version locally (not in /tmp) and only updating (git pull) is a lot more efficient the downloading everything every time.
The most convenient way is to run LMS directly from the checked out repository (which should exclude Bin/ and CPAN/arch, where you will have your own binaries instead), then a simple git pull will bring you up to dateVarious SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...
-
2015-08-29, 07:50 #7
- Join Date
- Aug 2012
- Location
- Austria
- Posts
- 1,129
Various SW: Web Interface | TUI | Playlist Editor / Generator | Music Classification | Similar Music | Announce | EventTrigger | Chiptunes | LMSlib2go | ...
Various HowTos: build a self-contained LMS | Bluetooth/ALSA | Control LMS with any device | ...