标签:部署nfs exportfs oca com ubunt art bind 挂载 code
1.服务端部署#安装
sudo apt-get install nfs--kernel-server
sudo apt-get install nfs--common
sudo apt-get instal rpcbind
#启动
sudo service nfs-kernel-server start
sudo service nfs-common start
sudo service rpcbind start
#测试nfs是否启动成功
showmount -e localhost
#安装
sudo apt-get install nfs--common
sudo apt-get instal rpcbind
#启动
sudo service nfs-common start
sudo service rpcbind start
#编辑配置文件
vim /etc/exports #编辑配置可以分享多个目录
/data/www_upload 172.16.0.0/16(rw,sync,all_squash)
/data/blog_upload 172.16.0.0/16(rw,sync,all_squash)
/data/bbs_upload 172.16.0.0/16(rw,sync,all_squash)
#重载nfs配置
sudo exportfs -rv
sudo mount -t nfs 172.16.1.31:/data/www_upload /data/www/upload
sudo mount -t nfs 172.16.1.31:/data/blog_upload /data/blog/upload
sudo mount -t nfs 172.16.1.31:/data/bbs_upload /data/bbs/upload
标签:部署nfs exportfs oca com ubunt art bind 挂载 code
原文地址:https://blog.51cto.com/linux1991/2451875