NFS服务器
NFS=Network Files System
NFS=Network Files System
1.定义:
作用于网络内,解决linux之间的文件共享;
作用于网络内,解决linux之间的文件共享;
2.nfs的软件包:
nfs-utils-1.0.9-16.el5.i386.rpm
nfs-utils-lib-1.0.9-16.el5.i386.rpm
nfs-utils-lib-devel-1.0.9-16.el5.i386.rpm
nfs-utils-1.0.9-16.el5.i386.rpm
nfs-utils-lib-1.0.9-16.el5.i386.rpm
nfs-utils-lib-devel-1.0.9-16.el5.i386.rpm
//安装nfs服务器包:
#rpm -ivh nfs*
#rpm -ivh nfs*
3.配置nfs的共享服务
//修改主配置文件
#vi /etc/exports
//修改主配置文件
#vi /etc/exports
//共享示例如下:
/ttt 192.168.0.0/24(rw)
/ttt 192.168.0.0/24(rw)
参数:
rw:读写权限
sync:同步写入磁盘
rw:读写权限
sync:同步写入磁盘
//启动nfs服务
#service nfs restart
#service nfs restart
//查看nfs的共享
#showmount -e 192.168.0.2
#showmount -e 192.168.0.2
//挂载nfs的共享目录到本机
#mount 192.168.0.2:/ttt /mnt/nfs
#mount 192.168.0.2:/ttt /mnt/nfs
转载于:https://blog.51cto.com/zyfbg/345695