Difference between revisions of "FreeBSD installation"
From Teknologisk videncenter
m |
m (→Install ports collection) |
||
(4 intermediate revisions by the same user not shown) | |||
Line 3: | Line 3: | ||
== /etc/fstab == | == /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. | 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. | ||
− | <source lang=" | + | <source lang="cli"> |
# Device Mountpoint FStype Options Dump Pass# | # Device Mountpoint FStype Options Dump Pass# | ||
/dev/da0s1b none swap sw 0 0 | /dev/da0s1b none swap sw 0 0 | ||
Line 18: | Line 18: | ||
== /etc/hosts == | == /etc/hosts == | ||
Flat file name service. Make sure the name of your server is coupled with the IP address of your server. Example below | Flat file name service. Make sure the name of your server is coupled with the IP address of your server. Example below | ||
− | <source lang= | + | <source lang=cli> |
::1 localhost localhost.tekkom.dk | ::1 localhost localhost.tekkom.dk | ||
ffff::ac10:0414 mars2 | ffff::ac10:0414 mars2 | ||
Line 26: | Line 26: | ||
== /etc/issue == | == /etc/issue == | ||
issue file is displayed while logging in. Also see [[FreeBSD installation#/etc/motd|/etc/motd]] | issue file is displayed while logging in. Also see [[FreeBSD installation#/etc/motd|/etc/motd]] | ||
− | < | + | <source lang=cli> |
− | [root@bsd /etc]# echo " | + | [root@bsd /etc]# <input>echo " |
Line 49: | Line 49: | ||
− | Mercantec" > /etc/issue | + | Mercantec" > /etc/issue</input> |
− | </ | + | </source> |
== /etc/motd == | == /etc/motd == | ||
motd - - Message of the day. Displayed after login. Also see [[FreeBSD installation#/etc/issue| /etc/issue]] | motd - - Message of the day. Displayed after login. Also see [[FreeBSD installation#/etc/issue| /etc/issue]] | ||
− | < | + | <source lang=cli> |
− | [root@bsd /etc]# echo " | + | [root@bsd /etc]# <input>echo " |
******************************************************************************* | ******************************************************************************* | ||
* LEGAL NOTICE * | * LEGAL NOTICE * | ||
Line 66: | Line 66: | ||
* heth@mercantec.dk * | * heth@mercantec.dk * | ||
* Have a :-) day * | * Have a :-) day * | ||
− | *******************************************************************************" > /etc/motd | + | *******************************************************************************" > /etc/motd</input> |
− | </ | + | </source> |
== /etc/ipnat.rules == | == /etc/ipnat.rules == | ||
Configuration of IP [[NAT]] See [[NAT FreeBSD]] | Configuration of IP [[NAT]] See [[NAT FreeBSD]] | ||
Line 74: | Line 74: | ||
nsswitch.conf -- name-service switch configuration file | 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 | * 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 | ||
− | <source lang= | + | <source lang=cli> |
# | # | ||
# nsswitch.conf(5) - name service switch configuration file | # nsswitch.conf(5) - name service switch configuration file | ||
Line 93: | Line 93: | ||
== /etc/rc.conf == | == /etc/rc.conf == | ||
Example rc.conf | Example rc.conf | ||
− | <source lang= | + | <source lang=cli> |
# -- sysinstall generated deltas -- # Wed Jan 14 14:04:35 2009 | # -- sysinstall generated deltas -- # Wed Jan 14 14:04:35 2009 | ||
# Created: Wed Jan 14 14:04:35 2009 | # Created: Wed Jan 14 14:04:35 2009 | ||
Line 132: | Line 132: | ||
== Ports collection == | == Ports collection == | ||
=== Install ports collection === | === Install ports collection === | ||
− | < | + | <source lang=cli> |
portsnap fetch | portsnap fetch | ||
− | </ | + | portsnap extract |
+ | </source> | ||
+ | |||
=== Upgrade ports collection === | === Upgrade ports collection === | ||
− | < | + | <source lang=cli> |
portsnap update | portsnap update | ||
− | </ | + | </source> |
== Updating system == | == Updating system == | ||
− | < | + | <source lang=cli> |
freebsd-update fetch | freebsd-update fetch | ||
freebsd-update install | freebsd-update install | ||
− | </ | + | </source> |
+ | = HUSK = | ||
+ | <source lang=cli> | ||
+ | pkg_add -r bash | ||
+ | pkg_add -r screen | ||
+ | </source> | ||
+ | *programmet screen | ||
+ | {{Source cli}} | ||
[[Category:FreeBSD]] | [[Category:FreeBSD]] |
Latest revision as of 11:09, 19 May 2013
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