Linux centos 5.5 NFS 配置
来源:互联网 发布:如何成为社交高手 知乎 编辑:程序博客网 时间:2024/06/11 06:48
CentOS系统服务器端配置
1 创建共享目录# mkdir /test/
2 创建或修改/etc/exports 配置文件
[root@localhost ~]# /etc/init.d/nfs start
启动 NFS 服务: [确定]
关掉 NFS 配额:无法注册服务: RPC:无法接收; errno = 拒绝连接
rpc.rquotad: unable to register (RQUOTAPROG, RQUOTAVERS, udp).
[失败]
启动 NFS 守护进程:
检测检查CentOS NFS服务器是否输出我们想共享的目录:[root@localhost ~]# /etc/init.d/nfs start
启动 NFS 服务: [确定]
关掉 NFS 配额:[确定]
启动 NFS 守护进程:[确定]
启动 NFS mountd:[确定]
正在启动 RPC idmapd:[确定]
[root@localhost ~]#
修改两个文件:[root@localhost ~]# exportfs
/test 200.168.10.0/24
[root@localhost ~]# vi /etc/hosts.deny
portmap:ALL
[root@localhost ~]# vi /etc/hosts.allow
portmap:200.168.10.*
查看服务端是否有共享目录:[root@localhost ~]# /etc/init.d/portmap start
启动 portmap:[确定]
使用mount 挂载服务端的目录[root@localhost ~]# showmount -e 200.168.10.10
Export list for 200.168.10.10:
/test 200.168.10.0/24
在在 /etc/fstab 中挂载 nfs 文件系统:[root@localhost ~]# mount -t nfs 200.168.10.10:/test /test
//查看
[root@localhost ~]# df -h
文件系统 容量 已用 可用 已用% 挂载点
/dev/sda1 9.5G 4.8G 4.3G 53% /
/dev/sda3 996M 34M 911M 4% /test
/dev/sda2 4.8G 138M 4.4G 4% /web
tmpfs 97M 0 97M 0% /dev/shm
/dev/hdc 3.9G 3.9G 0 100% /mnt/cdrom
200.168.10.10:/test 996M 34M 911M 4% /test
vi /etc/fstab
200.168.10.10:/test /test nfs defaults 0 0
保存后退出
启动:
chkconfig netfs on
在成功挂载服务器端的 /home 后就可以在客户端里操作了,这时候写文件或者拷贝文件的时候会遇到一个权限问题报错 : Permission denied,这是因为上面我们在服务器端建立了 /home 但是 /home 的 owner 是 root:root,而客户端的正在访问 NFS 的用户是 /home,NFS 要求服务器端和客户端的 UID 和 GID 必须一致,所以要在 NFS 服务器端修改 /home 的权限和所属: 1. # chown -R vpsee:vpsee /home
注意使用CentOS NFS 的时候,客户端的用户 UID 和 GID 必须和服务器端的 UID 和 GID 完全符合,否则会造成权限错误。在小规模用户的情况下,我们可以偷懒通过在客户和服务器两端同时建立相同的用户和组来解决这个问题,但是在大规模用户情况 下最好的办法是利用 NIS 或者 OpenLDAP 来统一管理用户,做到一次登录,到处访问。
- Linux centos 5.5 NFS 配置
- Linux centos 7 NFS 配置
- Centos linux NFS服务器的安装、配置
- CentOS 配置 NFS
- CentOS NFS配置
- centos nfs配置--转载
- CentOS配置NFS
- centos 下nfs配置
- CentOS配置NFS server
- Linux---centos安装配置并挂载NFS
- centos/fedora nfs的配置
- centos中配置NFS注意事项
- centos 6.2配置nfs共享
- CentOS---NFS安装、配置、使用
- CentOS NFS文件共享配置
- centos 6.5配置nfs服务器
- CentOS 7 安装配置 NFS
- CentOS中配置NFS服务
- C++学习 常量 const限定符
- SpringMVC中使用Interceptor拦截器
- Jmeter使用总结
- CentOS 6.4 : -bash :setup: command not found
- Yupoo!(又拍网)架构 是目前国内最大的图片服务提供商,整个网站构建于大量的开源软件之上
- Linux centos 5.5 NFS 配置
- mysql 主从复制实验------包含授权、bin-log
- LDAP 与 PHP
- Filesystem 函数:fopen、feof、fgets、fclose
- Vue----v-for 循环 及部分内部指令
- php之cURL学习笔记2
- cacti 实验:
- Apache 自带性能监控 server-status
- PHP 链式操作 __call call_user_func