NFS

Linux&unix 共享

NFS&NIS_titlerpc是否运行

SERVER

NFS&NIS_title_02

目录 客户(权限:ro 、rw 参数

/pub 192168.145.0/24(ro) 只读 (rw,sync)可写

NFS&NIS_border_03 以root身份

Chmod o+wt pub

Exportfs –rv 导出

Client

Mkdir /mnt/1

Showmount –e 192.168.145.100 查看145.100(server)的共享清单

Mount 19.168.145.100:/pub /mnt/1

Vim /etc/fstab 自动挂载

NFS&NIS_alt_04

192.168.145.100:/pub /mnt/1 autonfs soft,intr,default 0 0 Soft、intr 报错 中断

NFS&NIS_alt_05 ?---

NFS&NIS_target_06

Vim /etc/auto.master

NFS&NIS_title_07

NFS&NIS_blank_08

Vim /etc/auto.nfs

NFS&NIS_alt_09

Cd /mnt/1

Service autofs restart

Cd server 自动挂载、挂断

NIS

Nisserver: ip 145.100

NFS&NIS_alt_10

cd /var/yp make

Useradd tom passwd 123

Useradd tom2 passwd 123

Vim Makfile

NFS&NIS_target_11

/usr/lib/yb/ypinit -m 产生master服务器 -s 产生slave服务器

Vim /etc/sysconfig/network

NFS&NIS_alt_12? 增加域名redhats

NFS&NIS_border_13

NFS&NIS_target_14

Vim /etc/rc.d/rc.local

NFS&NIS_blank_15

Ypserver restart

NFS&NIS_border_16

Init6

/usr/lib/yb/ypinit -m

Ctrl+d

y

ll 会出现rehat目录

rpcinfo –p

Nisclient:

Setup 验证NFS&NIS_blank_17à use nis

NFS&NIS_target_18

Chkconfig –list |grep yp

Tail /etc/passwd

NFS&NIS_blank_19NFS&NIS_alt_20

Export –rv

NFS&NIS_alt_21NFS&NIS_border_22

NFS&NIS_alt_23

Nfs server 将家目录共享到client

NFS&NIS_title_24

NFS&NIS_border_25

Auto.master

NFS&NIS_blank_26

Auto.nis

NFS&NIS_border_27

NFS&NIS_target_28

Cd *