Last active
September 13, 2018 02:16
-
-
Save wangxianhe/d42c0b777287f215d5c18757fc0e0308 to your computer and use it in GitHub Desktop.
CentOS nfs服务
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# nfs服务端 | |
## 1、安装软件包 | |
yum -y install nfs-utils | |
## 2、启动服务 | |
systemctl start rpcbind | |
systemctl start nfs | |
systemctl enable rpcbind | |
systemctl enable nfs | |
## 3、 vi /etc/exports | |
/home *(rw,sync,no_root_squash) #详细权限信息可自行搜索 | |
## 4、 exportfs -rv | |
# NFS 客户端 | |
## 1、安装软件包 | |
yum -y install nfs-utils | |
## 2、启动服务 | |
systemctl start rpcbind | |
systemctl start nfs | |
systemctl enable rpcbind | |
systemctl enable nfs | |
## 3、挂载共享目录 | |
mount -t nfs node1:/home/ /home/ | |
开机自动挂载: | |
vi /etc/rc.local | |
加入:mount -t nfs node1:/home/ /home/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment