Linux nfs服务器
来源:互联网 发布:程序员试用期自我评价 编辑:程序博客网 时间:2024/06/15 09:05
一 安装 NFS
$ sudo apt-get install nfs-kernel-server
$ sudo apt-get install nfs-common
二 配置 NFS (略过)
1 $ sudo dpkg-reconfigure portmap , 对Should portmap be bound to the loopback address? 选 N
2 $ sudo vi /etc/default/portmap 末行清除 "-i 127.0.0.1"
三 配置 hosts.deny
$ sudo vi /etc/hosts.deny
文本末添加
### NFS DAEMONS
portmap: ALL
lockd: ALL
mountd: ALL
rquotad: ALL
statd: ALL
四 配置 hosts.allow
$ sudo vi /etc/hosts.allow
文本末加入
### NFS DAEMONS
portmap: 192.168.1.
lockd: 192.168.1.
rquotad: 192.168.1.
mountd: 192.168.1.
statd: 192.168.1.
$ sudo /etc/init.d/portmap restart 重启portmap daemon.
显示如下
Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restart portmap
portmap start/running, process XXXX
五 配置 /etc/exports
$ sudo vi /etc/exports
文本末添加
/root/rootfs *(rw,sync,no_root_squash)
然后在终端执行 $chmod 777 -R /root/rootfs
$ sudo showmount -e
显示 clnt-create : RPC : Program not registered
$ sudo exportfs -r 更新
$ sudo showmount 192.168.1.116 -e
显示
Export list for 192.168.1.116
/root/rootfs *
六 启用
$ sudo /etc/init.d/nfs-kernel-server restart 重启nfs 服务
显示如下
* Stopping NFS kernel daemon [ OK ]
* Unexporting directories for NFS kernel daemon... [ OK ]
* Exporting directories for NFS kernel daemon...
exportfs: /etc/exports [1]: Neither 'subtree_check' or 'no_subtree_check' specified for export "*:/home/work".
Assuming default behaviour ('no_subtree_check').
NOTE: this default has changed since nfs-utils version 1.0.x
* Starting NFS kernel daemon [ OK ]
挂载测试
$ mount -t nfs localhost:/root/rootfs /mnt
$ mount -t nfs -o nolock localhost:/root/rootfs /mnt
执行后,进入/mnt 目录中,如果可以看到 /root/rootfs中的内容,则说明 nfs搭建成功!
二、NFS(网络文件系统)的配置
(1) 安装
apt-get install nfs-kernel-server
apt-get install portmap nfs-common
(2)编辑配置文件 /etc/exports,添加一行
/nfs *.*(rw,sync,no_root_squash)
(3)修改挂载点的属性
chmod -R 0777 /nfs
(4)重启nfs
sudo /etc/init.d/nfs-kernel-server restart
sudo /etc/init.d/portmap restart
(5)在本机上测试
showmount -e
mount -t nfs 172.20.149.190:/nfs ./tmp
(1) 安装
apt-get install nfs-kernel-server
apt-get install portmap nfs-common
(2)编辑配置文件 /etc/exports,添加一行
/nfs *.*(rw,sync,no_root_squash)
(3)修改挂载点的属性
chmod -R 0777 /nfs
(4)重启nfs
sudo /etc/init.d/nfs-kernel-server restart
sudo /etc/init.d/portmap restart
(5)在本机上测试
showmount -e
mount -t nfs 172.20.149.190:/nfs ./tmp
- linux 服务器配置 NFS
- Linux NFS服务器配置
- linux服务器nfs笔记
- Linux NFS服务器配置
- Linux nfs服务器
- Linux NFS服务器
- Linux NFS服务器配置
- linux 搭建NFS服务器
- Linux服务器架设-NFS
- linux服务器 NFS挂载
- Linux下NFS服务器
- Linux nfs服务器配置
- 【NFS】linux下nfs服务器的搭建
- Linux NFS服务器性能优化
- Linux NFS服务器性能优化
- Linux NFS服务器性能优化
- Linux NFS服务器性能优化
- Linux NFS服务器性能优化
- NYOJ 题目79 拦截导弹 (dp,最长单调递减子序列)
- Linux sanba服务
- 用于图像分割的自适应距离保持水平及演化总结
- 黑马程序员————面向对象3(day7)
- android源码下载
- Linux nfs服务器
- vs2010 QT: release时 提示“无法找到.exe的调试信息 或者调试信息不匹配 未使用调试信息生成二进制文,是否继续调试”的解决方案
- Android和ios 图标设计 规范
- JSON-lib 示例
- zlib简单使用手册
- img宽度和全屏banner图注意事项
- 【每日一摩斯】-Shared Pool优化和Library Cache Latch冲突优化 (1523934.1)-系列2
- 校招季——Python笔记四
- 将默认的Netbeans中文版设置为英文界面