Latest News:
2018-11-29: XigmaNAS 11.2.0.4.6229 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS cost money, please consider a donation to our project so we can continue to offer you the best.
We need your support! eg: PAYPAL

SlimNAS on NAS4Free

XigmaNAS Extensions / Add-ons

Moderator: crest

Forum rules
Set-Up GuideFAQsForum Rules
Post Reply
jistme
experienced User
experienced User
Posts: 140
Joined: 23 Jun 2012 09:44
Location: Netherlands
Status: Offline

Re: SlimNAS on NAS4Free

#181

Post by jistme » 25 Nov 2018 13:35

@Stuarty,

I hope you could be so kind to give me a helping hand. (again)

I have clean-installed XigmaNAS, and now I will try to get slimnas up and running again.
For myself I have concocted a step by step tutorial which worked fine on my previous Nas4Free installation.
It contains pretty much the exact steps that you have published in this thread earlier.
I only made a change so it uses the most recent LMS that I could find. (7.9.2)

As expected, these steps and commands don't work anymore for the most recent XigmaNAS version.

So I'll need to modify it using the commands that you provided in your latest post. (#178)
But I don't know at what moment these new commands should be performed in the sequence of my write-up.
I am also not sure if they are complementary, or if they replace existing commands.

If you look at my step-by-step write-up, could you please explain at what moment these new commands should be performed, and what commands I should remove?

TIA!


My write-up:

1.
install TheBrig (by means of OneButtonInstaller)

2.
create a jail (e.g. named 'slimnas')
- add tarballs through TheBrig 'Maintenance'
- start and stop the jail to see if it works
- go to Advanced > File manager and create a (virtual) audio folder inside the slimnas jail. (name it the same as the actual audio folder)
- go to the configuration settings of the jail (Edit)
- click on 'more' (somewhere at the bottom)
- in the pane "Fstab for current jail", enter:
/mnt/WD30Red/Audio /mnt/WD30Red/OBI/thebrig/slimnas/Audio nullfs ro 0 0
(change the paths according to your actual setup)

3.
In XigmaNAS, under 'Services' enable SSH, check 'Permit Root Login'.

4.
- start console access (by means of Putty or a similar tool)
- use the ip adres of your jail
- login: root
- password: your XigmaNAS password

5. commands to perform in the console

Enter:

jexec slimnas csh


portsnap fetch extract


mkdir -p /usr/local/etc/pkg/repos


ee /usr/local/etc/pkg/repos/FreeBSD.conf

Paste:

FreeBSD: {
url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
mirror_type: "srv",
signature_type: "none",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}

- press [Esc]+[Enter]
- save? Yes

Enter:

pkg


y


rm /usr/local/etc/pkg.conf


pkg update -f && pkg upgrade


pkg install -y bash git gmake nasm rsync nano p5-DBI p5-EV p5-XML-Parser p5-HTML-Parser p5-JSON-XS p5-Digest-SHA1 p5-YAML-LibYAML p5-Sub-Name p5-Audio-Scan p5-Image-Scale p5-DBD-SQLite p5-Class-XSAccessor p5-Template-Toolkit p5-IO-Interface sox mac faad2 libgd p5-Cpanel-JSON-XS p5-DBI screen gcc49


rehash


mkdir /usr/local/lms


cd /usr/local/lms


git clone https://github.com/Logitech/slimserver-vendor.git


cd slimserver-vendor


ls -al


cd CPAN


ls -al


cp buildme.sh buildme.sh.original


nano buildme.sh


Use the cursor keys to navigate to: 'RUN_TESTS=1'
Change it to: 'RUN_TESTS=0'.
(use the 0 key at the top of your keyboard, not the one in the numeric keypad!)

[Ctrl]+[X] (exit)
[Y] (for save)
[Enter]


ln -s /usr/local/bin/gcc49 /usr/bin/gcc


ln -s /usr/local/bin/g++49 /usr/bin/g++


ln -s -f /usr/local/bin/perl5.24.1 /usr/bin/perl


ln -s -f /usr/local/bin/perl5.24.1 /usr/bin/perl5


./buildme.sh | tee /usr/local/lms/buildme.sh.log

(this can take about an hour)


cd /usr/local/lms/slimserver-vendor/CPAN/build


tar cf /usr/local/lms/arch.tar arch/


cd /usr/local/lms/slimserver-vendor/CPAN/build/5.24/lib/perl5/amd64-freebsd-thread-multi/Image


tar cf /usr/local/lms/Scale11.tar *


cd /usr/local/lms


fetch http://downloads-origin.slimdevices.com ... noCPAN.tgz

this forum truncates the url, it is intended to say: downloads-origin.slimdevices.com/nightly/7.9/sc/81275414b6a26d6bb36898d833605b5a6d707421/logitechmediaserver-7.9.2-1542807489-noCPAN.tgz
(you can check for newer versions, be sure to change subsequential commands accordingly)


tar xzf logitechmediaserver-7.9.2-1542807489-noCPAN.tgz


mv logitechmediaserver-7.9.2-1542807489-noCPAN/* .


tar xf arch.tar -C /usr/local/lms/CPAN/


mv /usr/local/lms/CPAN/Image/Scale.pm /usr/local/lms/CPAN/Image/_Scale.pm


cd /usr/local/lms/


tar xf Scale11.tar -C /usr/local/lms/CPAN/Image/


pw groupadd -n lms -g 30001


pw useradd -n lms -u 30001 -g lms -s /usr/sbin/nologin -c "Logitech Media Server" -d /nonexistent


nano /usr/local/etc/rc.d/lms


Paste this whole block:

Code: Select all

#!/bin/sh

# This script is a modified version of:
# $FreeBSD: branches/RELENG_9_2_0/audio/squeezeboxserver/files/squeezeboxserver.in 302141 2012-08-05 23:19:36Z dougb $

# PROVIDE: lms
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable lms on startup:
# lms_enable="YES"

# Optional configuration parameters:
# Directory where lms writes it's logs to.
# lms_logdir="/var/log/lms"
#
# Directory where lms stores it's cache files.
# lms_cachedir="/var/db/lms/cache"
#
# Directory where lms stores it's configuration.
# lms_prefsdir="/var/db/lms/prefs"
#
# Directory where lms stores the playlists. THIS NEEDS TO BE CONFIGURED THROUGH THE UI.
# lms_playlistdir="/var/db/lms/playlists"
#
# Additional parameters, e.g. "--noimage --novideo"
# lms_flags=""
#
# The charset lms uses.
# lms_charset="UTF-8"
#
# The LC_CTYPE envvar which is necessary to get rid of the warning
# """
# Your locale was detected as C, you may have problems with non-Latin filenames.
# Consider changing your LANG variable to the correct locale, i.e. en_US.utf8.
# """
# See https://forums.freenas.org/index.php?threads/logitech-media-server-for-freenas-9-2-1-1.19044/page-3#post-132872 
# lms_lc_ctype="en_US.UTF.8"

. /etc/rc.subr

name=lms
rcvar=lms_enable

pidfile=/var/run/${name}/${name}.pid
lms_user=lms
lms_group=lms

load_rc_config ${name}

: ${lms_enable="NO"}
: ${lms_logdir="/var/log/${name}"}
: ${lms_cachedir="/var/db/${name}/cache"}
: ${lms_prefsdir="/var/db/${name}/prefs"}
: ${lms_playlistdir="/var/db/${name}/playlists"}
: ${lms_flags=""}
: ${lms_charset="UTF-8"}
: ${lms_lc_ctype="en_US.UTF-8"}

command_interpreter=/usr/bin/perl
command=/usr/local/lms/slimserver.pl
command_args="\
--daemon \
--pidfile=${pidfile} \
--logdir=${lms_logdir} \
--cachedir=${lms_cachedir} \
--prefsdir=${lms_prefsdir} \
--charset=${lms_charset} \
${lms_flags}"

start_precmd="lms_start_precmd"
stop_postcmd="lms_stop_postcmd"

lms_start_precmd()
{
	export LC_CTYPE="${lms_lc_ctype}"

	if [ ! -d "${pidfile%/*}" ]; then	
		install -d -o ${lms_user} -g ${lms_group} ${pidfile%/*};
	fi

	if [ ! -d "${lms_logdir}" ]; then
		install -d -o ${lms_user} -g ${lms_group} "${lms_logdir}";
	fi

	if [ ! -d "${lms_cachedir}" ]; then
		install -d -o ${lms_user} -g ${lms_group} "${lms_cachedir}";
	fi

	if [ ! -d "${lms_prefsdir}" ]; then
		install -d -o ${lms_user} -g ${lms_group} "${lms_prefsdir}";
	fi

	if [ ! -d "${lms_playlistdir}" ]; then
		install -d -o ${lms_user} -g ${lms_group} "${lms_playlistdir}";
	fi
}

lms_stop_postcmd()
{
	pids=`pgrep -u ${lms_user}`
	if [ -n "${pids}" ]; then
		sleep 1
		kill $pids > /dev/null 2>&1
	fi
	pids=`pgrep -u ${lms_user}`
	if [ -n "${pids}" ]; then
		wait_for_pids $pids
	fi
}

run_rc_command "$1"
[Ctrl]-[O] (write)
[Enter]
[Ctrl]-[X] (exit and save)


chown -R lms:lms /usr/local/lms


chown root:wheel /usr/local/etc/rc.d/lms


chmod 555 /usr/local/etc/rc.d/lms


echo 'lms_enable="YES"' >> /etc/rc.conf


service lms onestart


/bin/sh /etc/rc


Done! You can exit the console.

User avatar
raulfg3
Site Admin
Site Admin
Posts: 4627
Joined: 22 Jun 2012 22:13
Location: Madrid (ESPAÑA)
Contact:
Status: Offline

Re: SlimNAS on NAS4Free

#182

Post by raulfg3 » 25 Nov 2018 22:48

superb.

great manual.

PD: perhaps FsBruba or others code gurus can add it to OBI so user can install on a simple click
XigmaNAS 11.2.0.4 - Omnius (revision 6195)+OBI on SUPERMICRO X8SIL-F 8GB of ECC RAM, 12x3TB disk in 3 vdev in RaidZ1 = 32TB Raw size only 22TB usable

Wiki
Last changes
Old Wiki

jistme
experienced User
experienced User
Posts: 140
Joined: 23 Jun 2012 09:44
Location: Netherlands
Status: Offline

Re: SlimNAS on NAS4Free

#183

Post by jistme » 25 Nov 2018 23:06

Thanks raulfg3!

But to put the credit where the credit is due: it's just a dumbed-down distillation of Stuarty's great work and support.
(I hardly understand what I copied and pasted ;-)

And what's more important to know for other users stumbling upon this post: this will only work for older NAS4Free installations. It doesn't work for current XigmaNAS versions.
Hopefully to be continued....

jistme
experienced User
experienced User
Posts: 140
Joined: 23 Jun 2012 09:44
Location: Netherlands
Status: Offline

Re: SlimNAS on NAS4Free

#184

Post by jistme » 04 Dec 2018 15:32

Is there perhaps another member with insight in this matter than give some guidance here?

(it looks like Stuarty is m.i.a./preoccupied)

cookiemonster
experienced User
experienced User
Posts: 76
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#185

Post by cookiemonster » 05 Dec 2018 09:34

What's the question?

jistme
experienced User
experienced User
Posts: 140
Joined: 23 Jun 2012 09:44
Location: Netherlands
Status: Offline

Re: SlimNAS on NAS4Free

#186

Post by jistme » 05 Dec 2018 11:12

Hi!

The question is perhaps a little buried in my post #181
It contains a step-by-step guide I created for myself in the past that will not work anymore for the latest XigmaNAS releases.
Stuarty posted new steps that should work in his post #178, but I am not sure at what moment (in relation to my own guide) they should be performed, and what commands from my guide they possibly replace, and thus can be removed from my guide.

cookiemonster
experienced User
experienced User
Posts: 76
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#187

Post by cookiemonster » 05 Dec 2018 12:33

Use the same process and when you get stuck post the specific question. I imagine few would have the time to step through for you to see if it works.
I expect all we'll need is to alter the urls as they were written some time ago.

jistme
experienced User
experienced User
Posts: 140
Joined: 23 Jun 2012 09:44
Location: Netherlands
Status: Offline

Re: SlimNAS on NAS4Free

#188

Post by jistme » 05 Dec 2018 13:26

This is not about getting stuck somewhere.

The prior steps as I described worked perfectly with Nas4FREE.
I can still perform them on XigmaNAS without 'getting stuck'.
But after completing them, Slimnas just won't work.
So something will need to be changed, and Stuarty has posted some commands for that.

So all that I am asking is at what stage they should be performed.

cookiemonster
experienced User
experienced User
Posts: 76
Joined: 23 Mar 2014 02:58
Location: UK
Status: Offline

Re: SlimNAS on NAS4Free

#189

Post by cookiemonster » 05 Dec 2018 14:43

Ah ok. Good luck.

Post Reply

Return to “Extensions / Add-ons”