1002作业

题目:
1、开放/nfs/shared目录,供所有用户查询资料;
2、开放/nfs/upload目录,供所有用户上传下载资料;
3、创建一个lv1,大小为2G,扩大它的大小为4G

一.关闭防火墙

[root@cwt-server ~]# systemctl stop  firewalld
[root@cwt-server ~]# systemctl disable firewalld
[root@cwt-server ~]# vim /etc/selinux/config
[root@cwt-server ~]# setenforce 0

二.安装NFS服务

[root@cwt-server ~]# yum install -y nfs-utils 
启动NFS服务
[root@cwt-server ~]# systemctl start nfs-server rpcbind

三.编辑配置文件和共享目录

[root@cwt-server ~]# vim /etc/exports
[root@cwt-server ~]# cat /etc/exports
/nfs/shared *(ro,sync) 
[root@cwt-server ~]# mkdir /nfs/shared -p
[root@cwt-server ~]# systemctl restart nfs-server rpcbind

四.在客户端关闭防火墙

[root@cwt-client ~]# systemctl stop firewalld
[root@cwt-client ~]# systemctl disable firewalld
[root@cwt-client ~]# vim /etc/selinux/config
[root@cwt-client ~]# setenforce 0

五.安装NFS服务

[root@cwt-client ~]# yum install -y nfs-utils rpcbind
[root@cwt-client ~]# systemctl start nfs-server rpcbind

六.在客户端查看共享目录

[root@cwt-client ~]# showmount -e 192.168.40.139
Export list for 192.168.40.139:
/nfs/shared *

七.创建挂载点目录,挂载

[root@cwt-client ~]# mkdir /hanyuce
[root@cwt-client ~]# mount -t nfs 192.168.40.139:/nfs/shared /hanyuce

八.创建共享目录

[root@cwt-server ~]# mkdir /nfs/upload

九.修改配置文件

[root@cwt-server ~]# cat /etc/exports
/nfs/upload 192.168.40.0/24(rw,anonuid=300,anongid=300,sync)
[root@cwt-server ~]# systemctl restart nfs-server rpcbind

十.在客户端查看共享目录

[root@cwt-client ~]# showmount -e 192.168.40.139
Export list for 192.168.40.139:
/nfs/upload 192.168.40.0/24

十一.创建挂载点目录,挂载

[root@cwt-client ~]# mkdir /chenwanting
[root@cwt-client ~]# mount -t nfs 192.168.40.139:/nfs/upload /chenwanting

十二.在服务器端设置属主和属组

[root@cwt-server ~]# chown nfs-upload.nfs-upload /nfs/upload
[root@cwt-server ~]# cd /nfs
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值