FreeBSD installation

From Teknologisk videncenter
Revision as of 09:41, 14 May 2009 by Heth (talk | contribs) (/etc/issue)
Jump to: navigation, search

Configuration files

/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]# echo "






          #######                         ######   #####  ######
          #        #####   ######  ###### #     # #     # #     #
          #        #    #  #       #      #     # #       #     #
          #####    #    #  #####   #####  ######   #####  #     #
          #        #####   #       #      #     #       # #     #
          #        #   #   #       #      #     # #     # #     #
          #        #    #  ######  ###### ######   #####  ######



Velkommen til FreeBSD version 6.1




Mercantec" > /etc/issue

/etc/motd

motd - - Message of the day. Displayed after login. Also see /etc/issue

[root@bsd /etc]# 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

/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
</text>
== /etc/rc.conf ==
Example rc.conf
<source lang="bash">
# -- 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"