I prefer FreeBSD over any Linux distribution. There are several reasons for it, probably personal.
If you want to know more about the differences, here is a google-link.
There are several options to setup the server:
- Use a cloud provider like Vultr and get a ready-to-run basic system
- Install it in a Hyper-V environment under Windows (for testing & learning)
- Install on a bare-metal system (I won’t do it here, as it’s similar to the Hyper-V)
This part describes the steps how to setup the FreeBSD system as it’s basic structure.
As usual, this is the way I prepare it. Others may do it differently.
I will start in choosing a datacenter on Vultr and it’s latest available FreeBSD version.
You may always start with a small server; it’s easy to upgrade when needed.
For learning, will create a FreeBSD 14.1 instance with 50GB NVMe, 2GB RAM, 3TB traffic (12$/month, but they charge by hour, so if I destroy the instance later, the test costs me less than 1$).
In my case, the basic install is ready within a few minutes. You will end up with a root password.
Terminal SSH will already work out of the box, and I prefer it over the console (due to copy/paste functions). Get the PuTTY client, if you haven’t done so already.
Use the IP from your server. Tip: under “Connection”, add a 10s keepalives.
If for whatever reason SSH doesn’t connect, you can always connect with the provided Console to the new server using root access.
Under “Connection”, add a 10s keepalive.
Under Connection-Data you may specify the user (e.a. root)
Adding public key authentication, see this post.
Add an admin user
pw useradd -n admin -G wheel -m -h 0 (e.a. add user "admin")
(to change the password, use passwd admin)
(to delete the user, use pw userdel -n admin )
Update packages and some basic tools
pkg update
pkg upgrade
pkg install nano rsync perl5
/etc/periodic/weekly/310.locate
Check the Blog for the following tasks to perform.
-
FreeBSD: change hostname permanently
To change FreeBSD’s server hostname: To make it permanent, surviving reboot: Here is a SH script to download or fetch:… Read more [see details]
-
FreeBSD: SSH public/private key (puTTY)
Install puTTY and run puttygen.exe (preferably run as Administrator) Generate a key pair. Save private key. You do NOT need… Read more [see details]
-
OpenSSL: Self-signed CA and certificates
I’ve found so many pages about this topic, each offer different styles and multiple commands. It’s quit confusing, so I… Read more [see details]