FreeBSD 11 Development Desktop on Dell XPS13

Table of Content

Installation and Basic Configuration

Language and Character Set Support

Boot Options

Mail Aliases

Software Update

Utility Applications

MKSH - Shell

TMUX - Terminal Multiplexer

SUDO - Priviledge Escalation

GIT - Version Control

Smartmontools - S.M.A.R.T Disk Monitor

Daemons

NGINX - Web Server

PostgreSQL - Database Server

CUPS - Common UNIX Printing Service

PF - Firewall

Graphical Interface Installation

Xorg - Display Server

Openbox - Window Manager

Conky - System Information Monitor

Administration

Adding a User

Summary

This article describes how to install FreeBSD 11 as a development workstation on a DELL XPS13 from 2014 with an intel Haswell processor. The article covers non-standard installation steps, configuration of the default system and installation of development tools for full stack development.

The installation includes setting the locale to English and adding Danish as secondary locale.

For details of the installation process follow the indivudual steps in the order laid out in the table of content. Below are listings of the fundamental configuration files at the end of the installation. Comments are added to the files to explain the reason for the setting where possible.

/etc/rc.conf

## Host Configuration ##
# Set keyboard layout to UK.
keymap="uk"

# Clear temporary files on shutdown.
clear_tmp_enable="YES"
clear_tmp_X="YES"

# Load graphics drivers on startup.
kld_list="i915kms"

# On crash dump the kernel.
dumpdev="AUTO"

# Use ZFS filesystem.
zfs_enable="YES"

# Load custom ruleset for hardware access
devfs_system_ruleset="common_rules"

## Network Configuration.
# Set hostname to laptop-name.
hostname="laptop-name"

# Setup wireless interface for WPA and DHCP.
wlans_iwm0="WPA DHCP"
create_args_wlan0="country GB regdomain ETSI"
	
## Host Daemons
# Add support for the trackpad.
moused_enable="YES"

# Start the power scaling daemon.
powerd_enable="YES"

# Start the DBUS messaging daemon.
dbus_enable="YES"

# Start the S.M.A.R.T monitoring daemon.
smartd_enable="YES"

# Start the autofs automounter.
autofs_enable="YES"

## Network Daemons ##
# Start the ssh connection daemon.
sshd_enable="YES"

# Start the NTP time keeping daemon.
ntpd_enable="YES"

# Start the Common UNIX Printing System Daemon.
cupsd_enable="YES"

# Start the PostgreSQL database server.
postgresql_enable="YES"

# Start the NGINX web server.
nginx_enable="YES"
		

/etc/sysctl.conf

# Allow users to mount removable devices.
vfs.usermount = 1
		

/etc/devfs.conf

# Allow user access to SCSI passtrough device
perm	/perm/pass0		0666
perm	/perm/xpt0		0666
		

/etc/devfs.rules

[common_rules=7]
add path	'ad[0-9]\*'	mode 0666
add path	'ada[0-9]\*'	mode 0666
add path	'da[0-9]\*'	mode 0666
add path	'acd[0-9]\*'	mode 0666
add path	'cd[0-9]\*'	mode 0666
add path	'mmcsd[0-9]\*'	mode 0666
add path	'pass[0-9]\*'	mode 0666
add path	'xpt[0-9]\*'	mode 0666
add path	'ugen[0-9]\*'	mode 0666
add path	'usbctl'	mode 0666
add path	'usb/\*'	mode 0666
add path	'lpt[0-9]\*'	mode 0666
add path	'ulpt[0-9]\*'	mode 0666
add path	'unlpt[0-9]\*'	mode 0666
add path	'fd[0-9]\*'	mode 0666
add path	'uscan[0-9]\*'	mode 0666
add path	'video[0-9]\*'	mode 0666
add path	'tuner[0-9]*'	mode 0666
add path	'dvb/\*'	mode 0666
add path	'cx88*'		mode 0660
add path	'cx23885*'	mode 0660 # CX23885-family stream configuration device
add path	'iicdev*' 	mode 0660
add path	'uvisor[0-9]*'	mode 0660
		

/boot/loader.conf

# Initialize ZFS filesystem.
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
zfs_load="YES"
	
# Load Wireless Interface Driver.
if_iwm_load="YES"
iwm7260fw_load="YES"
	
# Set console text mode.
hw.vga.textmode=1
	
# Added userspace character device.
cuse_load="YES"
	
# Load AESNI (cryptography) support.
aesni_load="YES"
	
# Enable power save for the GPU.
drm.i915.enable_rc6=7
	
# Enable hardware performance monitor.
hwpmc_load="YES"
	
# Disable power throttling to reduce heat at the expense of power.
hint.p4tcc.0.disabled="1"
hint.acpi_throttle.0.disabled="1"
hw.acpi.cpu.cx_lowest="cmax"
	
# Load Temperature monitor.
coretemp_load="YES"
	
# Turn off terminal bell.
kern.vt.enable_bell=0
		

The End Result

Final Desktop Look