User:Paul/sandbox/OpenBSD Basic Server

From UNPM.org Wiki
< User:Paul
Revision as of 14:33, 21 February 2020 by Paul (talk | contribs)
Jump to navigation Jump to search

OpenBSD has earned its reputation as a BSD descendant focused on security. With the increased development of OpenBSD's httpd and OpenSMTPD, plus most of the components commonly used in a basic web server, OpenBSD provides a highly secure and efficient choice for building servers.

Finding online support for OpenBSD can be much more difficult when compared to Linux. While the OpenBSD project requires its man pages to be very complete, support beyond man pages such as tutorials or sample configurations can be much harder to find. This has largely been due to the project being targeted at use primarily by professional systems administrators.

This tutorial will establish a basic web server that includes a functioning mail server with local maildir accessed through mutt.

Notable differences from Ubuntu Linux

Shell

Ubuntu default shell uses Bash (BASH) while OpenBSD uses KornShell (ksh).

ll (ls -alF)

Ubuntu has a convenient command, ll, for viewing directory contents that is a shortcut for ls -alF.

To add ll to the OpenBSD command line:

$ nano .profile

Add the following line:

alias ll="ls -alF"

Default editor

The default text editor in OpenBSD is vi. To change to a different default text editor:

$ nano .profile

Add the following line:

export EDITOR=nano

Email

OpenBSD in its default configuration comes with `opensmtpd` in a very secure configuration that supports outgoing mail. This is primarily useful for transactional email, most especially administrative messages.

Administrative message recipients can be configured in the aliases file and are default configured to be sent to the local root user local mailbox. To configure additional recipients:

$ doas nano /etc/mail/aliases

Change and add:

# Basic system aliases -- these MUST be present
MAILER-DAEMON: postmaster
postmaster: root
root: username@example.com, anotherusername@example.net