码迷,mamicode.com
首页 > 其他好文 > 详细

nfs挂载

时间:2019-07-14 09:13:50      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:share   shared   anon   port   pcb   util   common   com   tar   

yum -y install nfs-utils rpcbind
groupadd -g 27 mysql

seradd -u 27 -g mysql mysql
mkdir /home/sharednfs

vim /etc/exports

/home/sharednfs *(rw,all_squash,anonuid=27,anongid=27)

systemctl restart nfs
systemctl enable rpcbind.service
systemctl enable nfs-server.service

/etc/init.d/mysqld stop
cp -rp /var/lib/mysql/ /var/lib/mysqlnfs
修改my.cnf 的路劲
reboot

apt-get install nfs-common
yum install nfs-utils -y
/etc/init.d/rpcbind start
mkdir /var/lib/mysqlnfs
mount -t nfs 192.168.31.207:/var/lib/mysql /var/lib/mysqlnfs
showmount -e 127.0.0.1

vi /etc/fstab
添加: 192.168.56.101:/opt/test /opt/test nfs defaults 0 0

nfs挂载

标签:share   shared   anon   port   pcb   util   common   com   tar   

原文地址:https://blog.51cto.com/hzcto/2420003

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!