DrKK
FreeNAS Generalissimo
- Joined
- Oct 15, 2013
- Messages
- 3,630
EDIT, SEPTEMBER 2014: PLEASE SEE THIS POST WITH A VIDEO TUTORIAL I MADE
Mods: I am not sure what the right place for this post is, so move it wherever you'd like.
Jails are pretty sweet. The vast majority of people I see using jails on FreeNAS are doing things like pbi's for Plex and other plug-ins. But, you can actually run a full-featured BSD system that performs other services for you. Which, I personally, think is nice. So this guide, while it focuses on installing the Mumble server (murmur), should give you some insights into the correct procedure to setting up a concurrent FreeBSD general-purpose jail alongside your FreeNAS server. In this jail you can have all sorts of fun, in addition to setting up any software (more or less) that could be set up on any FreeBSD server.
I don't know how many people this will be useful for. But this is a guide for getting murmur (the server-side of the famous Mumble PTT/VAD/streaming program) set-up and running on your FreeNAS (FreeBSD) box in a jail. My server had been running on a Windows 7 box, under self-administration, but I was getting sick of it, and mumble servers just simply run better under Linux or BSD, to say nothing of the ease with which ICE and other systems can be used compared to a home Windows box. Plus I have this beautiful over-provisioned FreeNAS box just begging for something else to do as well...so it was obvious.
1) If you don't already have a suitable jail, I suggest creating a "port jail" in your FreeNAS. During jail creation, you probably do not want a VIMAGE, and you probably want to uncheck the "vanilla" box. Those of you that need a VIMAGE or vanilla jail probably already know who you are, and if you don't, then you probably don't need either; uncheck them. (Notice that by so doing, many of the confusing options in the "add jails" dialog will grey-out, which is nice.)
2) In your jail, you're going to want to compile/build "murmur", which is the server-side of the Mumble software. Assuming you're on the current FreeNAS (which is 9.2 at this writing), you will be able, in the FreeNAS GUI, to get to a command-line prompt by highlighting the jail in the jails screen, and click the appropriate icon. If not, get to the command line via jexec (Google it, if necessary)--ssh is not yet correctly configured (or, possibly, even started!) on your jail (we'll get there, be patient), so that's not an option. Switch to the murmur ports directory in your jail: and then go ahead and make the full software, and install it, with this command:
Warnings:
4) Before you go much further, set up your basic services that you'll want. First, set up a root password by issuing at the jail's command prompt.
For me, "ssh" is very important, because I like to get a nice command prompt directly from my ssh client into the jail. If you have your ssh service set up just the way you like it in your FreeNAS server itself, the best thing I've found to do is to just copy over the configuration file from your FreeNAS. You can find it by going to your FreeNAS (not the jail) command line and:
Mine (which I pulled almost verbatim from my FreeNAS) is pretty simple:
By whatever means you like, update your sshd_config file (which, in the fresh jail, will be a large, sample file that will probably NOT be to your liking in its settings) to be like the above, subject to whatever mods you like. For example, you might perform the editing by doing this:
then using the nano text editor we built in the previous steps to transcribe the proper sshd config file.
Once you've done that, then:
and make sure a line that says this:
sshd_enable="YES"
is in there. Now that you've done it, test your ssh by turning the service on:
Then try to log in (with putty, bitvise ssh client, whatever you like), remember that you must use your jail's IP address (not your FreeNAS IP address). Make sure everything is fine and that you can bring up a command-line in ssh for your jail.
5) Now you're all set to go. You have a FreeBSD system running alongside your FreeNAS, and you can do whatever you want, install whatever you want, play around, etc. To finish installing murmur, you will need to tweak the file:
You can either copy your murmur.ini file over from another server as-is, or you can edit (again, with nano, for example) the file to suit your needs. If you are making a brand new murmur (mumble) server, go to the mumble website and look for their "murmurguide" to help you set it up. If you are migrating over from another Linux or Windows or whatever murmur server, you will need to find a copy of your sqlite database file that you were using (as it contains your certificated users, your channel tree, all that stuff), and you will need to place it into (i.e., by copying the file using whatever method you like):
6) Now start the murmur service, temporarily, with:
If all has gone well, you should now be able to see this server in Mumble (manually attempt to connect your Mumble client to your jail IP and the port you specified in the .ini file), connect to it, and, if you ported an old server, it should look pretty much EXACTLY like your previous Mumble server. If it looks good, edit the /etc/rc.conf file again to include the line murmur_enable="YES", and turn on the murmur service as part of your standard OS services by:
And that's it! Hopefully you found it useful--I am happy to answer questions.
Mods: I am not sure what the right place for this post is, so move it wherever you'd like.
Jails are pretty sweet. The vast majority of people I see using jails on FreeNAS are doing things like pbi's for Plex and other plug-ins. But, you can actually run a full-featured BSD system that performs other services for you. Which, I personally, think is nice. So this guide, while it focuses on installing the Mumble server (murmur), should give you some insights into the correct procedure to setting up a concurrent FreeBSD general-purpose jail alongside your FreeNAS server. In this jail you can have all sorts of fun, in addition to setting up any software (more or less) that could be set up on any FreeBSD server.
I don't know how many people this will be useful for. But this is a guide for getting murmur (the server-side of the famous Mumble PTT/VAD/streaming program) set-up and running on your FreeNAS (FreeBSD) box in a jail. My server had been running on a Windows 7 box, under self-administration, but I was getting sick of it, and mumble servers just simply run better under Linux or BSD, to say nothing of the ease with which ICE and other systems can be used compared to a home Windows box. Plus I have this beautiful over-provisioned FreeNAS box just begging for something else to do as well...so it was obvious.
1) If you don't already have a suitable jail, I suggest creating a "port jail" in your FreeNAS. During jail creation, you probably do not want a VIMAGE, and you probably want to uncheck the "vanilla" box. Those of you that need a VIMAGE or vanilla jail probably already know who you are, and if you don't, then you probably don't need either; uncheck them. (Notice that by so doing, many of the confusing options in the "add jails" dialog will grey-out, which is nice.)
2) In your jail, you're going to want to compile/build "murmur", which is the server-side of the Mumble software. Assuming you're on the current FreeNAS (which is 9.2 at this writing), you will be able, in the FreeNAS GUI, to get to a command-line prompt by highlighting the jail in the jails screen, and click the appropriate icon. If not, get to the command line via jexec (Google it, if necessary)--ssh is not yet correctly configured (or, possibly, even started!) on your jail (we'll get there, be patient), so that's not an option. Switch to the murmur ports directory in your jail:
Code:
cd /usr/ports/audio/murmur
Code:
make install clean
Warnings:
- It will take a long-ass time (long ass-time?) to build something like murmur on a fresh portjail. Each dependency upon which murmur relies (and some are very time-consuming to build) must also be built, and so on. You can actually expect the whole procedure to take the better part of an hour on many systems.
- You will be asked, during the installation process, about several options you have to install or not install this, that, and the other optional part of murmur, and all of its dependencies. It's best to accept the default choices unless you know precisely what you're doing. These will require keyboard interactions, so you should not go away from your computer for too long.
Code:
cd /usr/ports/editors/nano make install clean
4) Before you go much further, set up your basic services that you'll want. First, set up a root password by issuing
Code:
passwd
For me, "ssh" is very important, because I like to get a nice command prompt directly from my ssh client into the jail. If you have your ssh service set up just the way you like it in your FreeNAS server itself, the best thing I've found to do is to just copy over the configuration file from your FreeNAS. You can find it by going to your FreeNAS (not the jail) command line and:
Code:
cd /etc/ssh cat sshd_config
Mine (which I pulled almost verbatim from my FreeNAS) is pretty simple:
Code:
root@portjail:/etc/ssh # cat sshd_config Protocol 2 UseDNS no Subsystem sftp /usr/libexec/sftp-server -l ERROR -f AUTH ChallengeResponseAuthentication no ClientAliveCountMax 3 ClientAliveInterval 15 Port 22 PermitRootLogin yes AllowTcpForwarding yes Compression no PasswordAuthentication yes PubkeyAuthentication yes
By whatever means you like, update your sshd_config file (which, in the fresh jail, will be a large, sample file that will probably NOT be to your liking in its settings) to be like the above, subject to whatever mods you like. For example, you might perform the editing by doing this:
Code:
mv sshd_config sshd_config.old nano sshd_config
then using the nano text editor we built in the previous steps to transcribe the proper sshd config file.
Once you've done that, then:
Code:
nano /etc/rc.conf
and make sure a line that says this:
sshd_enable="YES"
is in there. Now that you've done it, test your ssh by turning the service on:
Code:
service sshd restart Performing sanity check on sshd configuration. sshd not running? (check /var/run/sshd.pid). Performing sanity check on sshd configuration. Starting sshd. root@portjail:/etc #
Then try to log in (with putty, bitvise ssh client, whatever you like), remember that you must use your jail's IP address (not your FreeNAS IP address). Make sure everything is fine and that you can bring up a command-line in ssh for your jail.
5) Now you're all set to go. You have a FreeBSD system running alongside your FreeNAS, and you can do whatever you want, install whatever you want, play around, etc. To finish installing murmur, you will need to tweak the file:
Code:
/usr/local/etc/murmur.ini
You can either copy your murmur.ini file over from another server as-is, or you can edit (again, with nano, for example) the file to suit your needs. If you are making a brand new murmur (mumble) server, go to the mumble website and look for their "murmurguide" to help you set it up. If you are migrating over from another Linux or Windows or whatever murmur server, you will need to find a copy of your sqlite database file that you were using (as it contains your certificated users, your channel tree, all that stuff), and you will need to place it into (i.e., by copying the file using whatever method you like):
Code:
/var/db/murmur/murmur.sqlite
6) Now start the murmur service, temporarily, with:
Code:
service murmur onestart
If all has gone well, you should now be able to see this server in Mumble (manually attempt to connect your Mumble client to your jail IP and the port you specified in the .ini file), connect to it, and, if you ported an old server, it should look pretty much EXACTLY like your previous Mumble server. If it looks good, edit the /etc/rc.conf file again to include the line murmur_enable="YES", and turn on the murmur service as part of your standard OS services by:
Code:
service murmur onestop service murmur start
And that's it! Hopefully you found it useful--I am happy to answer questions.
Last edited: