Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1791023
  • 博文数量: 334
  • 博客积分: 11301
  • 博客等级: 上将
  • 技术积分: 3452
  • 用 户 组: 普通用户
  • 注册时间: 2006-10-18 10:19
个人简介

路虽弥,不行不至;事虽少,不做不成。

文章分类

全部博文(334)

文章存档

2013年(4)

2012年(19)

2011年(27)

2010年(71)

2009年(45)

2008年(15)

2007年(84)

2006年(69)

分类: LINUX

2006-12-21 15:38:00

                                Nfs/Samba/Apache
    

      NFS &autofs             

            

# sample /etc/exports file (setup-2.5.37-1.3)

       /               master(rw) trusty(rw,no_root_squash)

       /projects       proj*.local.domain(rw)

       /usr               *.local.domain(ro) @trusted(rw)

       /home/joe     pc001(rw,all_squash,anonuid=150,anongid=100)

       /pub              (ro,insecure,all_squash)

 

       The first line exports the entire filesystem to  machines  master  and trusty.In addition to write access, all uid squashing is turned off for host trusty. The second and third entry show examples for wildcard  hostnames  and  netgroups  (this  is the entry trusted). The fourth line shows the entry for the PC/NFS client  discussed  above. Line exports the public FTP directory to every host in the world, executing all requests under the nobody account. The  insecure  option in this entry  also  allows  clients with NFS implementations that do use a reserved port for NFS. 

 

 1  NFS SERVER (/etc/exports)     <----exportfs -a  (全部导出)

          |

          |

          |

 2   nfs client(三种挂载方法)

 

服务器端

1.1修改/etc/exports

   /tmp             192.168.1.0/24(rw,sync,all_squash,anonuid=500,anongid=501)

1.2  启动服务service nfs start

1.3  导出文件系统 exportfs -a

 

客户端(service nfs start)

2.1. 启动挂载/etc/fstab                         

  192.168.1.117:/home         /misc             nfs           defaults       0      0

          

2.2.手工挂载

  # mount  -t nfs  192.168.1.117:/home      /misc   

 

2.3.自动挂载

2.3.1)修改/etc/auto.master

 加一行

 /misc    /etc/auto.misc

2.3.2)修改/etc/auto.misc

abcd     192.168.1.117:/home   

:abcd这个名称在本机是没有的,是自动生成的

2.3.3)启动服务service autofs  restart 

2.3.4)service autofs reload

 
二.Samba
 
三.Apache
 
 
阅读(1425) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~