- 
							
linux下配置nfs实现共享
普通类 - 
							
- 支持
 - 批判
 - 提问
 - 解释
 - 补充
 - 删除
 
 - 
							
- 
													linux下文件共享建立虚拟路径方法
 
centos6变更了portmap服务为rpcbind,在使用nfs时这点与centos5不同,下面配置一个nfs系统,用来使局域网内的所有用户均可访问该目录,可将该目录配置成yum源,供内网机器安装软件。
首先安装NFS套件,命令如下:
yum
install nfs-utils.x86_64(64位系统) yum
install nfs-utils(32位系统) 然后安装portmap服务,portmap在centos6中改名为rpcbind
yum
install rpcbind(centos6) yum
install portmap(centos5) 挂载光盘,将文件拷贝到要挂载的目录上
mkdir
/opt/centos6 mount
/dev/cdrom /media -o loop cp
-r /media/* /opt/centos6/ 配置nfs服务端
vi
/etc/exports 添加
/opt/centos6
192.168.0.0/24(ro,no_root_squash) 这一行表明本机的/opt/centos6这个目录为nfs共享目录,可访问的ip地址区间为192.168.0.0-192.168.0.254,权限为只读,当访问者为root用户时方位该目录具有root权限
重启nfs服务
/etc/init.d/rpcbind
start /etc/init.d/nfs
start 将nfs加入开机启动项
chkconfig
nfs on 客户端配置
查看是否能访问nfs服务
showmount
-e 192.168.0.10 显示如下:
Export list for 192.168.0.10:
/opt/centos6 192.168.0.11
表示可以访问,如不可访问查看nfs服务端nfs服务是否启用,防火墙是否允许通过。
挂载nfs目录
mkdir
/opt/centos6 mount
-t nfs 192.168.0.10:/opt/centos6/ /opt/centos6/  - 
													
 - 
							
- 标签:
 - opt
 - 配置
 - linux
 - 安装
 - 服务
 - 目录
 - nfs
 - linux下配置nfs实现共享
 - 系统
 - centos6
 - 访问
 
 - 
				
				
加入的知识群:
 
			
								
						
学习元评论 (0条)
聪明如你,不妨在这 发表你的看法与心得 ~