ID:2196304
 
Installing Dream Daemon("DD") on a FreeBSD system is a fairly straightforward process. The caveat is that it will require Linux (32-bit) compat layer("Linuxolator"). If you do not have root access and cannot request the Linuxolator be enabled, then this guide is not for you.

The first step to installing DD is enabling the Linuxolator. You may refer to this section of the FreeBSD handbook for guidance on doing so, or in summary:

First, ensure Linux support is enabled in the kernel. If your kernel configuration does not enable "options COMPAT_LINUX32", or you are not sure, then you will need to load it as a kernel module:

kldload linux

At this point, you should either get no output from the above command, or the following message:

kldload: can't load linux: module already loaded or in kernel

If this is the case, you're A-OK. Make sure that the 'linux' module is loaded at boot time by appending to /boot/loader.conf:

linux_load="YES"

Alright, the hard part's done. The rest is easy.

Make sure you have 'gmake' (GNU Make) installed:

pkg install devel/gmake

Next, Download the Linux version of BYOND that you wish to use. At the time of writing:

fetch "http://www.byond.com/download/build/510/ 510.1346_byond_linux.zip"

Unzip it:

unzip 510.1346_byond_linux.zip

From here, there's ~3 good ways to proceed, based on how much of a purist you are and what you want to accomplish. Some people have reservations about adding applications to /usr/local that they don't generally have recorded somewhere (pkg, port). Others don't care and do it anyways, and still others only want to use the local installation (gmake here) anyways.

If you're the purist, use jails to install it in.

For the other two scenarios, I'm going to assume you've descended (cd) into the 'byond' directory that we just extracted. The first step, whether you want to install it globally anyways or just do a local install, is to 'brand' the executables as Linux ELFs:

brandelf -t Linux bin/Dream*

From there, there's two paths pretty much following the Makefile's direction. If you want to install globally anyways, you may run the following:

gmake install LIB_DIR=/compat/linux/lib

The LIB_DIR setting is required to make sure that we've installed the libs into the place where FreeBSD expecting Linux libs to go. `DreamDaemon` should now run as expected, and you are finished here.

However, if you want to install it locally, it's even easier.

gmake here

Finally, follow the directions for using a local installation. If you're using the default shell (csh), then ~/.cshrc is your startup script rather than ~/.profile and ~/.bash_profile.