English Chinese (Simplified) (zh_CN)
inetd_enable="YES"
inetd_enable="YES"
ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l
ftp stream tcp nowait root /usr/libexec/ftpd ftpd -l
service-name
socket-type
protocol
{wait|nowait}[/max-child[/max-connections-per-ip-per-minute[/max-child-per-ip]]]
user[:group][/login-class]
server-program
server-program-arguments
service-name
socket-type
protocol
{wait|nowait}[/max-child[/max-connections-per-ip-per-minute[/max-child-per-ip]]]
user[:group][/login-class]
server-program
server-program-arguments
`max-connections-per-ip-per-minute` limits the number of connections from any particular IP address per minute. Once the limit is reached, further connections from this IP address will be dropped until the end of the minute. For example, a value of `/10` would limit any particular IP address to ten connection attempts per minute. `max-child-per-ip` limits the number of child processes that can be started on behalf on any single IP address at any moment. These options can limit excessive resource consumption and help to prevent Denial of Service attacks. <option>max-connections-per-ip-minute</option>限制来自特定的<acronym>IP</acronym>地址每分钟的连接数。一旦达到限制值,来自该IP地址的后续连接将被中断,一分钟后恢复正常。例如,<literal>/10</literal>的值将限制特定的<acronym>IP</acronym>地址每分钟的连接尝试次数为10次。<option>max-child-per-ip</option>限制了在任何时刻代表任何单个<acronym>IP</acronym>地址启动的子进程数量。这些选项可以限制过多的资源消耗,并有助于防止拒绝服务攻击。
finger stream tcp nowait/3/10 nobody /usr/libexec/fingerd fingerd -k -s
finger stream tcp nowait/3/10 nobody /usr/libexec/fingerd fingerd -k -s
server-program-arguments server-program-arguments
Used to specify any command arguments to be passed to the daemon on invocation. If the daemon is an internal service, use `internal`. 用于指定调用时要传递给守护进程的任何命令参数。如果守护进程是内部服务,请使用<option>internal</option>。
FreeBSD supports the Network File System (NFS), which allows a server to share directories and files with clients over a network. With NFS, users and programs can access files on remote systems as if they were stored locally. FreeBSD 支持网络文件系统 (<acronym>NFS</acronym>),它允许服务器通过网络与客户端共享目录和文件。使用<acronym>NFS</acronym>,用户和程序可以访问远程系统上的文件,就像它们存储在本地一样。
Several clients may need access to the [.filename]#/usr/ports/distfiles# directory. Sharing that directory allows for quick access to the source files without having to download them to each client. 多个客户端可能需要访问<filename>/usr/ports/distfiles</filename>目录。共享该目录可以直接访问源文件,而无需将其下载到每个客户端。
On large networks, it is often more convenient to configure a central NFS server on which all user home directories are stored. Users can log into a client anywhere on the network and have access to their home directories. 在大型网络上,配置存储所有用户主目录的中央<acronym>NFS</acronym>服务器通常更方便。用户可以登录到网络上的任意位置的客户端,并可以访问其主目录。
NFS consists of a server and one or more clients. The client remotely accesses the data that is stored on the server machine. In order for this to function properly, a few processes have to be configured and running. <acronym>NFS</acronym> 至少包括两个主要的部分: 一台服务器, 以及至少一台客户机, 客户机远程地访问保存在服务器上的数据。 要让这一切运转起来, 需要配置并运行几个程序。
/usr/home -alldirs 10.0.0.2 10.0.0.3 10.0.0.4
/usr/home -alldirs 10.0.0.2 10.0.0.3 10.0.0.4
/a -maproot=root host.example.com box.example.org
/a -maproot=root host.example.com box.example.org
A client can only be specified once per file system. For example, if [.filename]#/usr# is a single file system, these entries would be invalid as both entries specify the same host: 每个文件系统只能指定一次客户端。例如,如果<filename>/usr</filename>是单个文件系统,则这些条目将无效,因为两个条目都指定相同的主机:
# Invalid when /usr is one file system
/usr/src client
/usr/ports client
# Invalid when /usr is one file system
/usr/src client
/usr/ports client
/usr/src /usr/ports client
/usr/src /usr/ports client
# Export src and ports to client01 and client02, but only
# client01 has root privileges on it
/usr/src /usr/ports -maproot=root client01
/usr/src /usr/ports client02
# The client machines have root and can mount anywhere
# on /exports. Anyone in the world can mount /exports/obj read-only
/exports -alldirs -maproot=root client01 client02
/exports/obj -ro
# Export src and ports to client01 and client02, but only
# client01 has root privileges on it
/usr/src /usr/ports -maproot=root client01
/usr/src /usr/ports client02
# The client machines have root and can mount anywhere
# on /exports. Anyone in the world can mount /exports/obj read-only
/exports -alldirs -maproot=root client01 client02
/exports/obj -ro
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_enable="YES"
rpcbind_enable="YES"
nfs_server_enable="YES"
mountd_enable="YES"
nfs_client_enable="YES"
nfs_client_enable="YES"
To mount a remote file system each time the client boots, add it to [.filename]#/etc/fstab#: 如果您打算让系统每次在重启动的时候都自动挂载远端的文件系统,把那个文件系统加到 <filename>/etc/fstab</filename> 文件里头去。下面是例子: