ubuntu:
/etc/host.conf---------告诉域名
服务器怎么查找主机名
/etc/hosts---------网络中已发现的主机的名称列表,用于解析主机名
/etc/hostname
命令: hostname stone
NFS
配置文件:
/etc/exports
a.参数
rw: 可擦写的权限
ro: 只读的权限
no_root_squash: 登入 NFS 主机使用分享目录的使用者,如果是 root 的话,那么对于这个分享的目录来说,他就具有 root 的权限!这个项目『极不安全』,不建议使用!
root_squash: 在登入 NFS 主机使用分享之目录的使用者如果是 root 时,那么这个使用者的权限将被压缩成为匿名使用者,通常他的 UID 与 GID 都会变成 nobody 那个身份;
all_squash: 不论登入 NFS 的使用者身份为何,他的身份都会被压缩成为匿名使用者,
anonuid: 前面关于 *_squash 提到的匿名使用者的 UID 设定值,通常为 nobody,但是你可以自行设定这个 UID 的值!当然,这个 UID 必需要存在于你的 /etc/passwd 当中!
anongid: 同 anonuid ,但是变成 group ID 就是了
sync: 资料同步写入到内存与硬盘当中
async: 资料会先暂存于内存当中,而非直接写入硬盘
安装NFS:
apt-get install nfs-kernel-server
#service portmap start
#service nfs start
or
/etc/init.d/nfs-kernel-server start stop restart status(查询状态)
/etc/init.d/portmap start
TFTP文件配置:
TFTP (trial file transfer protocol)是一种网络协议,主要用在文件的传输,在嵌入式交叉开发环境中被广泛使用。
配置文件:
/etc/xinetd.d/tftp 是关于tftp服务的配置文件。
service tftp
{
disable = no
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s -c /tftpboot //
per_source = 11
cps = 100 2
flags = IPv4
}
启TFTP
/etc/init.d/xinetd restart
etc/network/interface 里修改 ubuntu