Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2454324
  • 博文数量: 225
  • 博客积分: 11622
  • 博客等级: 上将
  • 技术积分: 7358
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-18 10:05
个人简介

我们的生活是多么美好呀!!!!

文章存档

2013年(2)

2012年(9)

2011年(59)

2010年(8)

2009年(35)

2008年(112)

分类: LINUX

2009-05-25 16:42:02

Linux服务器间共享文件的方式有很多种(ftp、smba、nfs)这里给介绍以下,Linux下nfs文件共享方式和实现的方法。
1、首先要开启portmap和nfs服务。
   service portmap start
   service nfs start
2、查看服务是否开启。
   netstat -ntpl
3、修改 /etc/exports
   vi /etc/exports
#/home/temp *(rw,sync,no_root_squash,all_squash)
/home/temp *(ro,sync,no_root_squash,all_squash)  (/home/temp 表示要被共享的目录)
/mnt/inst *(ro,sync)                             (* 表示任意地址)
4、exportfs -a                                   (到处所以共享的目录)
5、showmount -e 127.0.0.1                        (查被共享的目录)
  Export list for 127.0.0.1:
/mnt/inst  *
/home/temp *
6、在客户端输入所需要的共享文件。
mount -t nfs 192.168.111.1:/mnt/inst /mnt        (mount服务器上的共享目录)
7、在客户端使用mount命令,就可以看到刚才被mount的文件了。
这样简单的就是实现了文件共享。
阅读(903) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~