/usr/local/etc/rc.d 安装应用程序的启动/停止的脚本 。
稳定的系统指定的数据文件:bind 区域文件 , 数据库文件等等 。/var/db
6.7.2 主机名
6.7.2.1 /etc/resolv.conf
/etc/resolv.conf 描述了FreeBSD 如何访问internet 的域名系统(DNS) 。最普通的
resolv.conf 的记录是:
nameserver 要查询的域名服务器的IP 地址 。服务器按照顺序查询 。
搜索域名的列表 。这通常是由本地的域名决定的 。search
本地域名 。domain
第7 页FreeBSD 使用手册
一个典型的resolv.conf:
search foobar.com
nameserver 147.11.1.11
nameserver 147.11.100.30
DhclIEnt 通常会把DHCP 服务器接收到的信息重写resolv.conf 。
6.7.2.2 /etc/hosts
/etc/hosts 是一个文本数据库 。它是用来联合DNS 和NIS 给IP 地址的影射表提供名字 。
本地的电脑通过一个LAN 进行连接 , 可能会作为一个简单的命名目的而放在这儿 , 以代替设
置一个名称服务器 。另外 , /etc/hosts 能被用来提供一个本地internet 名称的记录 , 减少
搜索普通访问名称的需求 。
# $FreeBSD$
#
# Host Database
# This file should contain the addresses and aliases
# for local hosts that share this file.
# In the presence of the domain name service or NIS, this file may
# not be consulted at all; see /etc/nsswitch.conf for the resolution order.
#
#
::1 localhost localhost.my.domain myname.my.domain
127.0.0.1 localhost localhost.my.domain myname.my.domain
#
第8 页FreeBSD 使用手册
# Imaginary network.
#10.0.0.2 myname.my.domain myname
#10.0.0.3 myfriend.my.domain myfriend
#
# According to RFC 1918, you can use the following IP networks for
# private nets which will never be connected to the Internet:
#
# 10.0.0.0 - 10.255.255.255
# 172.16.0.0 - 172.31.255.255
# 192.168.0.0 - 192.168.255.255
#
# In case you want to be able to connect to the Internet, you need
# real official assigned numbers. PLEASE PLEASE PLEASE do not try
# to invent your own network numbers but instead get one from your
# network provider (if any) or from the Internet Registry (ftp to
# rs.internic.net, Directory ‘/templates").
#
/etc/hosts 的简单格式:
[Internet address] [offical hostname] [alias1] [alias2] ...
例如:
10.0.0.1 myRealHostname.foobar.com myRealHostname foobar1 foobar2
第9 页FreeBSD 使用手册
6.7.3 日志文件配置
6.7.3.1 syslog.conf
Syslog.conf 是syslogd 程序的配置文件 。它指出记录到日志文件的syslog 信息的类
型 。
# $FreeBSD$
#
# Spaces ARE valid field separators in this file. However,
# other *nix-like systems still insist on using tabs as field
# separators. If you are sharing this file between systems, you
# may want to use only tabs as field separators here.
# Consult the syslog.conf manpage.
*.err;kern.debug;auth.notice;mail.crit /dev/console
*.notice;kern.debug;lpr.info;mail.crit;news.err /var/log/messages
security.* /var/log/security
mail.info /var/log/maillog
lpr.info /var/log/lpd-errs
cron.* /var/log/cron
*.err root
*.notice;news.err root
*.alert root
*.emerg *
# uncomment this to log all writes to /dev/console to /var/log/console.log
第10 页FreeBSD 使用手册
#console.info /var/log/console.log
# uncomment this to enable logging of all log messages to /var/log/all.log
#*.* /var/log/all.log
# uncomment this to enable logging to a remote loGhost named loghost
#*.* @loghost
# uncomment these if you"re running inn
# news.crit /var/log/news/news.crit
# news.err /var/log/news/news.err
# news.notice /var/log/news/news.notice
!startslip
. /var/log/slip.log
!ppp
. /var/log/ppp.log
6.7.3.2 newsyslog.conf
Newsyslog.conf 是newsyslog 程序的配置文件 。一个被cron newsyslog 安排来运行的
程序决定了什么时候日志文件要求重新存档或整理 。Logfile 会被改为logfile.1,
推荐阅读
- 1 FreeBSD handbook中文版 11 打印 基本设置
- FreeBSD 4.10 汉化总结
- 终极软件DIY之FreeBSD下USB打印机的安装经验谈
- FreeBSD handbook中文版 3 Unix 基础
- FreeBSD 4.0 Kernel Hacking Guide--vm/vm_init.c
- FreeBSD 5.3 ports 安装 AMP
- FreeBSD handbook中文版 9 配制FreeBSD 的内核
- FreeBSD命令ps介绍
- freebsd 配制文件
- FreeBSD的系统log日志
