ubuntu 12.04 nfs-server/client安装配置
由于opennebula的共享存储的方式需要nfs,为了opennebula 3.8在ubuntu 12.04上搭建做铺垫,先介绍下nfs server和client端的安装和配置。
1. nfs server端的安装和配置
(1)安装nfs server
- sudo apt-get install nfs-kernel-server nfs-common
- sudo service nfs-kernel-server restart
- sudo vim /etc/exports
- //在文件末尾添加一行
-
/path-to-share *(rw,sync) //path-to-share是要共享的目录,根据自己情况修改
2. nfs client端安装和配置
(1)安装nfs client
(2)查看nfs server上共享的目录
- sudo apt-get install nfs-common
- showmount -e 192.168.xx.xx
(3)创建共享挂载点,并执行挂载
- mkdir /path-to-mount
- mount -t nfs 192.168.xx.xx:/path-to-share /path-to-mount
(4)修改/etc/fstab文件
- 192.168.35.17:/data3/nfsroot/data3/nfsroot nfs defaults 0 0