1.nfs共享存储 1.1存储服务的作用 将数据进行统一共享存储,节省磁盘存储空间 1.2.存储服务部署过程 1.2.1.服务端部署 第一个历程:安装软件程序 Yum install -y nfs-utils 第二个历程:编写配置文件 Vim /etc/exports /data/www 172.16.1.0/24(rw,sync) /data/bbs 172.16.1.0/24(rw,sync) /data/blog 172.16.1.0/24(rw,sync) 第三个历程:创建存储目录 Mkdir /data/{www,bbs,blog} -p Chown www,www /data/www Chown www,www /data/bbs Chown www,www /data/blog Ps:将属主,属组的名称修改为www,然后创建www用户使其和web服务器的站点目录的属主,属组用户相同。 第四个历程:启动服务程序 systemctl start rpcbind systemctl start nfs 1.2.2.客户端部署 第一个历程:安装软件程序 Yum install -y nfs-utils 第二个历程:挂载存储设备 mount -t nfs 172.16.1.7:/data/www /html/www mount -t nfs 172.16.1.7:/data/bbs /html/bbs mount -t nfs 172.16.1.7:/data/blog /html/blog