[FreeBSD] Installation and setting up

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.
1

Keymap selection

The default is US keyboard, which is what I am using.
2

Configure hostname

This is required for generating RSA key pair for ssh.
3

Select your distribution

I chose those that made sense to me.
4

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.
5

6789

Installation in progress

1011

Change root password

This started immediately after the installation completed.
The entire configuration process was automated and step by step.
12

Configure ipv4 address and dns client

13141516

Set up time zone and time

1718192021

Choose which service to start during booting

22

Choose system hardening techniques

I only chose those I understand what the technique mean.
23

Add normal user account

Again this is part of the automated installation process, I did not trigger user account creation the wizard did.
242526

Installation completed

272829

Setting up the environment

After installation only a shell is available for interaction with the system.
30

Enable ssh login

Create a rsa key pair of strong length.
31

Then change the configuration of /etc/ssh/sshd_config with vi, just uncomment pre-configured settings in the sshd_config.
3233

Any changes with the config file has to be restarted to take into effect.
34

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.
35

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
37

Login to the FreeBSD with putty

38.PNG

FreeBSD security patches and update

sudo freebsd-update fetch
39

sudo freebsd-update install
40

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
42

Extract the portsnap downloaded.
sudo portsnap extract
43

Updating and upgrading pkg

sudo pkg update
44

sudo pkg upgrade
45

Install xorg

Before installing desktop environment I need to install X.org.
sudo pkg install xorg
46

Install slim

This is the login manager, which is the login splash.

sudo pkg install slim slim-themes
47

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
48

Auto run service on start up and start mate desktop

We will need to enable these services in rc.local

  1. hald: On my first attempt if this daemon is not started my mouse cannot move.
  2. dbus
  3. 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
49

50

Start mate automatically

Create .xinitrc in my home directory.
nano .xinitrc
and insert exec mate-session
51

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.
52

sudo pkg install open-vm-tools xf86-input-vmmouse xf86-video-vmware
54

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s