debian6 添加nfs服务

来源:互联网 发布:在淘宝网上买东西 编辑:程序博客网 时间:2024/06/06 05:13

作者:Canbus

转自:http://blog.csdn.net/canbus/article/details/8434283


1.安装portmap

     root@debian:/opt/mini2440# apt-get install portmap

2.安装nfs

# apt-get install nfs-kernel-server

3.修改exports

 root@debian:/opt/mini2440# vi /etc/exports
添加一行: /opt/mini2440 *(rw,no_root_squash)

*  表示所有的客户机都可以挂接此目录(也可以限定IP。如:192.168.1.*) 
rw  表示挂接此目录的客户机对该目录有读写的权力 
no_root_squash  表示允许挂接此目录的客户机享有该主机的 root 身份 


4.重启portmap及nfs服务

     # /etc/init.d/portmap restart 

    # /etc/init.d/nfs-kernel-server restart  

    

5.测试是否成功

    # mount -t nfs localhost:/opt/mini2440 /mnt


原创粉丝点击