User Tools

Site Tools


archive:freebsd_install

How To Install FreeBSD

Note: This guide is made for FreeBSD 10 64 Bit. Unless otherwise specified accept the default options when asked a question during installation.

Install FreeBSD

Adjust time by using date and then hour + minutte in one word like the example below for 14:08.

date 1408

Update / Patch FreeBSD

freebsd-update fetch
freebsd-update install
reboot now

Note: The above may fail due to various issues. If this is the case you can try to fetch from a designated FreeBSD server like this.

freebsd-update -s update3.freebsd.org fetch

Update Ports

portsnap fetch extract
portsnap fetch update

Modify the hosts config file

The host configuration file should reflect your machine. The file we need to edit is “hosts” located in /etc. Below is a very simple hosts example:

::1			localhost localhost.yourdomain.xyz
127.0.0.1		localhost localhost.yourdomain.xyz

# This Host

xxx.xxx.xxx.xxx         domain
xxx.xxx.xxx.xxx         domain.xyz
xxx.xxx.xxx.xxx         domain.xyz.

# Known Hosts

xxx.xxx.xxx.xxx		domain
xxx.xxx.xxx.xxx		domain.xyz

# Known Servers

xxx.xxx.xxx.xxx		servername1
xxx.xxx.xxx.xxx		servername2

Configure SSH daemon for remote login

vi /etc/ssh/sshd_config

Remove the # and or change the following lines.

Port SOME_OTHER_PORT_THAN_22
PermitRootLogin no
PasswordAuthentication yes
PermitEmptyPasswords no
ChallengeResponseAuthentication no

Add a "Daily" user

adduser

Give the above added user root priviliges.

pw user mod USERNAME -G wheel

Optional shell configuration start

Add colors to the csh shell environment.

cd ~
vi .cshrc

Add the following line.

setenv  TERM xterm-color
setenv  CLICOLOR
setenv  LSCOLORS dxfxcxdxbxegedbaagbxbx

Optional shell configuration stop

Install Bash

cd /usr/ports/shells/bash && make install clean BATCH=yes

Add the following line to /etc/fstab

echo "fdesc   	/dev/fd         fdescfs rw      0       0" >> /etc/fstab

Replace the current shell with Bash for USERNAME as well as root.

chsh -s /usr/local/bin/bash USERNAME
chsh -s /usr/local/bin/bash root

Notes on Bash: Bash will install what is the current release of Perl as a dependency. If you would like some other version of perl on your system install that first before installing bash.

You may need to create or modify the configuration files when using bash. This is especially true if you plan to install Ntp from ports. For root the configuration file is called .bashrc For everyone else it's called .profile I recomend adjusting the search path for all users not just root.

Find the following line in either .profile or .bashrc whatever file your user is using.

PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:$HOME/bin; export PATH

Change it so it looks like this.

PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:$HOME/bin; export PATH

In order for changes to take effect either log out and in again or “re-source” your profile.

Modify Perl Path

Important: Many programs are still relying on perl beeing located in /usr/bin like for example VMware Tools, but perl now installes itself in /usr/local/bin. Luckily we can have our cake and eat it too. Add the following symlink to solve the issue.

cd /usr/bin
mv perl perl.old >/dev/null 2>&1
ln -s /usr/local/bin/perl perl

Note: The above command mv perl perl.old should result in an error as perl should not be found there until symlinked.

Notes on Xen: If you are running Citrix Xen Visualization changes are that your date and timezone may need to be adjustet accordingly or you may have entered wrong timezone. You may have to choose UTC. Normally you would Choose “No” to UTC. To rerun the timezone setup run the following command but this time use UTC.

tzsetup

Notes on FreeBSD installation A list of tools, tips and utilities to accompany the installation can be found here Usefull Tools Tips And Utilities

archive/freebsd_install.txt · Last modified: 24/11/2023 12:24 by Allan