NFS
Linux&unix 共享
SERVER
目录 客户(权限:ro 、rw 参数
/pub 192168.145.0/24(ro) 只读 (rw,sync)可写
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 自动挂载
192.168.145.100:/pub /mnt/1 autonfs soft,intr,default 0 0 Soft、intr 报错 中断
Vim /etc/auto.master
Vim /etc/auto.nfs
Cd /mnt/1
Service autofs restart
Cd server 自动挂载、挂断
NIS
Nisserver: ip 145.100
cd /var/yp make
Useradd tom passwd 123
Useradd tom2 passwd 123
Vim Makfile
/usr/lib/yb/ypinit -m 产生master服务器 -s 产生slave服务器
Vim /etc/sysconfig/network
Vim /etc/rc.d/rc.local
Ypserver restart
Init6
/usr/lib/yb/ypinit -m
Ctrl+d
y
ll 会出现rehat目录
rpcinfo –p
Nisclient:
Chkconfig –list |grep yp
Tail /etc/passwd
Export –rv
Nfs server 将家目录共享到client
Auto.master
Auto.nis
Cd *