Centos7部署YUM仓库及NFS共享服务 (二)
NFS共享存储服务
NFS:(Network File System)网络文件系统
1.依赖于RPC (远端过程调用)
2.需安装nfs-utils,rpcbind软件包
3.系统服务:nfs,rpcbind
4.共享配置文件:/etc/exports
建立NFS共享存储服务的具体步骤
1.新建一块磁盘,分区格式化并挂载到/mnt目录下
2.安装nfs-utils rpcbind 软件包
[[email protected] ~]# yum install nfs-utils rpcbind -y
3.修改nfs服务配置文件
[[email protected] ~]# vim /etc/exports
4.启动服务
[[email protected] ~]# systemctl start nfs
[[email protected] ~]# systemctl start rpcbind
5.关闭防火墙
[[email protected] ~]# systemctl stop firewalld.service
[[email protected] ~]# setenforce 0
6.自身查看/mnt目录是否提供出去
[[email protected] ~]# showmount -e
7.打开客户端虚拟机,关闭防火墙
[[email protected] ~]# systemctl stop firewalld.service
[[email protected] ~]# setenforce 0
8.安装httpd服务
[[email protected] ~]# yum install httpd -y
9.挂载
[[email protected] ~]# mount 192.168.100.128:/mnt /var/www/html
10.查看站点的容量
补充:自动挂载修改配置文件
[[email protected] ~]# vim /etc/fstab
使用mount -a执行即可