NFS服务配置(用于在网络上共享存储)
服务端配置NFS
CentOS上使用NFS服务需要安装两个包(nfs-utils和rpcbind),不过使用yum工具安装nfs-utils时会一并安装rpcbind
[root@ns1 ~]# mount /dev/sr0 /mnt/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@ns1 ~]# cd /etc/yum.repos.d/
[root@ns1 yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-Debuginfo.repo CentOS-Media.repo
[root@ns1 yum.repos.d]# vim CentOS-Media.repo
[root@ns1 yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
[root@ns1 yum.repos.d]# yum repolist
已加载插件:fastestmirror, security
Loading mirror speeds from cached hostfile
仓库标识 仓库名称 状态
c6-media CentOS-6 - Media 6,706
repolist: 6,706
[root@ns1 yum.repos.d]# yum install -y nfs-utils
已加载插件:fastestmirror, securit
服务端配置NFS
CentOS上使用NFS服务需要安装两个包(nfs-utils和rpcbind),不过使用yum工具安装nfs-utils时会一并安装rpcbind
[root@ns1 ~]# mount /dev/sr0 /mnt/
mount: block device /dev/sr0 is write-protected, mounting read-only
[root@ns1 ~]# cd /etc/yum.repos.d/
[root@ns1 yum.repos.d]# ls
CentOS-Base.repo CentOS-fasttrack.repo CentOS-Vault.repo
CentOS-Debuginfo.repo CentOS-Media.repo
[root@ns1 yum.repos.d]# vim CentOS-Media.repo
[root@ns1 yum.repos.d]# mv CentOS-Base.repo CentOS-Base.repo.bak
[root@ns1 yum.repos.d]# yum repolist
已加载插件:fastestmirror, security
Loading mirror speeds from cached hostfile
仓库标识 仓库名称 状态
c6-media CentOS-6 - Media 6,706
repolist: 6,706
[root@ns1 yum.repos.d]# yum install -y nfs-utils
已加载插件:fastestmirror, securit