Skip to content

Server FreeBSD

Jonathan edited this page Apr 27, 2020 · 3 revisions

IN PROGRESS DO NOT PUBLISH

Gilgongo note: This was added by somebody to the client install section, but it's instructions for compiling a headless server. Much of it duplicates the Linux install, which is risky if things change later. So I'd rather combine it with the Linux install stuff once I've tested both client and server installs on BSD to make sure it actually works.


Home > Running a Server > Installing on FreeBSD

NOTE: This guide will only install Jamulus Server

Right now, we don't have any official packages available for running Jamulus Server on FreeBSD, but compiling the sources is quite easy. Let's get started:

Install the dependent packages

sudo pkg install qt5-qmake qt5-buildtools qt5-core qt5-gui qt5-xml qt5-widgets git

Get sources

Clone the repository to get the sources

git clone https://github.com/corrados/jamulus.git

Compile program

Now cd jamulus into the jamulus sources directory and compile the sources with the following commands (the last make may take several minutes to run):

qmake "CONFIG+=nosound" Jamulus.pro
make

Installation

Install binary:

sudo cp ./Jamulus /usr/local/bin/jamulus

Create service user:

sudo pw useradd -n c -jamulus "Jamulus daemon" -s /usr/sbin/nologin -d /nonexistent -w no

Install startup script in /usr/local/etc/rc.d/jamulus:

#!/bin/sh
#
# $Id$
#

# PROVIDE: jamulus
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following line to /etc/rc.conf to enable Jamulus Daemon:
#
# jamulus_enable="YES"

. /etc/rc.subr

name="jamulus"
rcvar=jamulus_enable

load_rc_config $name

# set defaults
: ${jamulus_enable="NO"}
: ${jamulus_user="jamulus"}
: ${jamulus_command_args="-w Welcome_to_Jumulus_running_on_FreeBSD -e jamulus.fischvolk.de  -o $(hostname -f) -F"}

procname="/usr/local/bin/jamulus"
command="/usr/sbin/daemon"
command_args="-S -T ${name} $procname --server --nogui ${jamulus_command_args}"

run_rc_command "$1"

Make startup script executable:

sudo chown 755 /usr/local/etc/rc.d/jamulus

Enable daemon: echo 'jamulus_enable="YES"' | sudo tee -a /etc/rc.conf

Running Program

All done, let's get started:

sudo service jamulus start

Logentries are found in syslog.