FreeBSD installation
From Teknologisk videncenter
Contents
Configuration files
/etc/fstab
the fstab files holds the filesystems table. This file is used during boot to mount the file systems shown. Except filesystems with the noauto clause.
# Device Mountpoint FStype Options Dump Pass#
/dev/da0s1b none swap sw 0 0
/dev/da1s1b none swap sw 0 0
/dev/da0s1a / ufs rw 1 1
/dev/da1s1e /home ufs rw 2 2
/dev/da0s1d /tmp ufs rw 2 2
/dev/da0s1e /usr ufs rw 2 2
/dev/da1s1d /var ufs rw 2 2
/dev/da0s1f /var/cache1 ufs rw,noauto 2 2
/dev/da1s1f /var/cache2 Ufs rw,noauto 2 2
/dev/acd0 /cdrom cd9660 ro,noauto 0 0
/etc/hosts
Flat file name service. Make sure the name of your server is coupled with the IP address of your server. Example below
::1 localhost localhost.tekkom.dk
ffff::ac10:0414 mars2
127.0.0.1 localhost localhost.tekkom.dk
83.90.47.30 mars.tekkom.dk mars
/etc/issue
issue file is displayed while logging in. Also see /etc/motd
[root@bsd /etc]# <input>echo "
####### ###### ##### ######
# ##### ###### ###### # # # # # #
# # # # # # # # # #
##### # # ##### ##### ###### ##### # #
# ##### # # # # # # #
# # # # # # # # # # #
# # # ###### ###### ###### ##### ######
Velkommen til FreeBSD version 6.1
Mercantec" > /etc/issue</input>
/etc/motd
motd - - Message of the day. Displayed after login. Also see /etc/issue
[root@bsd /etc]# <input>echo "
*******************************************************************************
* LEGAL NOTICE *
* ============ *
* *
* ANY UNAUTHORISED ACCESS OR ATTEMPT TO ACCESS THIS SITE WILL - WITHOUT ANY *
* PRIOR WARNING - BE REPORTED TO LEGAL AUTHORITIES. *
* *
* Please report any attempts to *
* heth@mercantec.dk *
* Have a :-) day *
*******************************************************************************" > /etc/motd</input>
/etc/ipnat.rules
Configuration of IP NAT See NAT FreeBSD
/etc/nsswitch.conf
nsswitch.conf -- name-service switch configuration file
- Make sure the line hosts: is configured properly. In the example below the dns resolver first look in /etc/hosts(files) then it uses dns
#
# nsswitch.conf(5) - name service switch configuration file
# $FreeBSD: src/etc/nsswitch.conf,v 1.1.6.1 2008/11/25 02:59:29 kensmith Exp $
#
group: compat
group_compat: nis
hosts: files dns
networks: files
passwd: compat
passwd_compat: nis
shells: files
services: compat
services_compat: nis
protocols: files
rpc: files
/etc/rc.conf
Example rc.conf
# -- sysinstall generated deltas -- # Wed Jan 14 14:04:35 2009
# Created: Wed Jan 14 14:04:35 2009
# Enable network daemons for user convenience.
# Please make all changes to this file, not to /etc/defaults/rc.conf.
# This file now contains just the overrides from /etc/defaults/rc.conf.
defaultrouter="83.90.47.29"
hostname="mars.tekkom.dk"
ifconfig_vr1="inet 83.90.47.30 netmask 255.255.255.252"
ifconfig_em0="inet 192.168.22.73 netmask 255.255.255.0"
ifconfig_em1="inet 172.16.4.16 netmask 255.255.255.0"
keymap="danish.iso"
#Enable ssh
sshd_enable="YES"
apache_enable="YES"
mysql_enable="YES"
dhcpd_enable="YES"
webmin_enable="YES"
ntpd_enable="YES"
#Internet NAT Router
gateway_enable="YES" # Enable as LAN gateway
ipnat_enable="YES" # Start ipnat function
ipnat_rules="/etc/ipnat.rules" # rules definition file for ipnat
searchd_enable="YES" # sphnix search engine to mediawiki
#Add school networks
# Add Internal Nets as static routes
static_routes="backbone tekkom printers"
route_tekkom="-net 192.168.128.0/17 172.16.4.1"
route_backbone="-net 172.16.4.0/24 172.16.4.1"
route_printers="-net 172.16.67.0/24 172.16.4.1"
/etc/ssh/sshd_config
Contains the configuration of the sshd server. Sometimes you will change this file to allow login as root. The you need to change the line containng PermitRootLogin to yes
FreeBSD ports
FreeBSD ports are software packages you can install
Updating
Ports collection
Install ports collection
portsnap fetch
portsnap extract
Upgrade ports collection
portsnap update
Updating system
freebsd-update fetch
freebsd-update install
HUSK
pkg_add -r bash
pkg_add -r screen
- programmet screen