当前位置首页 > Ubuntu知识

ubuntu下安装nfs-minus01

阅读次数:259 次  来源:admin  发布时间:

ubuntu 下安装nfs 2013-08-20 19:10  minus01  阅读(307)  评论(0)  编辑  收藏  举报

1. 安装nfs服务,设置nfs主目录

tom@ubuntu:/$ sudo mkdir -p /source/rootfs/

tom@ubuntu:/$ sudo chmod -R 777 /source

tom@ubuntu:/~$ sudo apt-get install nfs-kernel-server

2. 编辑/etc/exports ,配置nf

tom@ubuntu:/tftpboot$ sudo vim /etc/export

1 /etc/exports: the access control list for filesystems which may be exported to NFS clients. See exports(5).
2 # Example for NFSv2 and NFSv3:
3 # /srv/homes   hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
4 # Example for NFSv4:
5 # /srv/nfs4     gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
6 # /srv/nfs4/homes  gss/krb5i(rw,sync,no_subtree_check)
7 /source/rootfs/   *(rw,sync,no_subtree_check,no_root_squash)

3. 重启nfs服务

tom@ubuntu:/tftpboot$ sudo /etc/init.d/nfs-kernel-server restart

* Stopping NFS kernel daemon                                            [ OK ]

* Unexporting directories for NFS kernel daemon...                      [ OK ]

* Exporting directories for NFS kernel daemon...                        [ OK ]

* Starting NFS kernel daemon                                            [ OK ]

4. 挂载nfs共享目录

tom@ubuntu:/$ sudo mount -t nfs  192.168.0.108:/source/rootfs ~/nf

5. 卸载共享目录

tom@ubuntu:~$ sudo umount ~/nfs/

分类 ubuntu 标签 nf

ubuntu下安装nfs-minus01

上一篇:「Debian」-禁用Nouveau驱动@20210316
下一篇:为DELLinspiron14R安装CentOSX646.4