I first tried the Dragonfly and I felt Dragonfly is not for me, it does not share the same repo as FreeBSD despite it is based on FreeBSD.
So I tried the FreeBSD then tried the OpenBSD, and I still like FreeBSD because the installation as compared with OpenBSD is friendlier and more automatic than OpenBSD, the guided ncurses wizard looks vintage but is quite automatic and user friendly.
Installation
Welcome menu
So after the vm started with the iso inserted, I was immediately greeted with choices, very easy to understand and straight to the point.
Keymap selection
The default is US keyboard, which is what I am using.
Configure hostname
This is required for generating RSA key pair for ssh.
Select your distribution
I chose those that made sense to me.
Harddisk partioning
The hard disk has to be partitioned and a file system has to be chosen, for this installation I am using ZFS though I am not sure how is this different from UFS.
Installation in progress
Change root password
This started immediately after the installation completed.
The entire configuration process was automated and step by step.
Configure ipv4 address and dns client
Set up time zone and time
Choose which service to start during booting
Choose system hardening techniques
I only chose those I understand what the technique mean.
Add normal user account
Again this is part of the automated installation process, I did not trigger user account creation the wizard did.
Installation completed
Setting up the environment
After installation only a shell is available for interaction with the system.
Enable ssh login
Create a rsa key pair of strong length.
Then change the configuration of /etc/ssh/sshd_config
with vi
, just uncomment pre-configured settings in the sshd_config
.
Any changes with the config file has to be restarted to take into effect.
Empower normal user with root privilege
My new user is a member of wheel, and I need sudo to run root commands without directly login to root.
So before I switch to normal user and ssh to the FreeBSD I need the sudo package, which is not included out of the box.
pkg install sudo
For this part it was automatic, the system detected that pkg was not available and self install pkg then proceed to install sudo for me, which in OpenBSD does not have.
So I need to enable the wheel to run root privilege commands, after sudo was installed the sudoers is present for me to enable wheel. Until now I still had not installed nano, using vi was fine for deleting characters for me 🙂
vi /usr/local/etc/sudoers
Login to the FreeBSD with putty
FreeBSD security patches and update
sudo freebsd-update fetch
sudo freebsd-update install
Portsnap
Port is something new to me, as in Linux there is no such jargon, what i knew is port is a recipe for compiling source code to application.
sudo portsnap fetch
Extract the portsnap downloaded.
sudo portsnap extract
Updating and upgrading pkg
sudo pkg update
sudo pkg upgrade
Install xorg
Before installing desktop environment I need to install X.org.
sudo pkg install xorg
Install slim
This is the login manager, which is the login splash.
sudo pkg install slim slim-themes
Install mate
There are a few KDE, XFCE, MATE, GNOME and CINNAMON. I chose MATE as I have got a PoC FreeBSD on XFCE.
sudo pkg install mate
Auto run service on start up and start mate desktop
We will need to enable these services in rc.local
- hald: On my first attempt if this daemon is not started my mouse cannot move.
- dbus
- slim
sudo nano /etc/rc.local
I will be putting these:
hald_enable="YES"
dbus_enable="YES"
slim_enable="YES"
I have forgotten to install nano, so I install nano first sudo pkg install nano
Start mate automatically
Create .xinitrc in my home directory.
nano .xinitrc
and insert exec mate-session
After this reboot the system.
sudo reboot
or sudo shutdown -r now
or sudo init 6
.
Install open-vm-tools
Because the perl script provided by vmware workstation does not release for freebsd anymore, so i need to install open-vm-tools.
sudo pkg install open-vm-tools xf86-input-vmmouse xf86-video-vmware