服务管理 NFS
发布时间:2020-12-13 23:38:51 所属栏目:Linux 来源:网络整理
导读:1、关闭防火墙(4步) [email?protected] ~]# systemctl stop firewalld [[email?protected] ~]# systemctl disable firewalld [[email?protected] ~]# vim /etc/selinux/config [[email?protected] ~]# setenforce 0 2、安装nfs服务(nfs-utils rpcbind)[[
1、关闭防火墙(4步) [email?protected] ~]# systemctl stop firewalld [[email?protected] ~]# systemctl disable firewalld [[email?protected] ~]# vim /etc/selinux/config [[email?protected] ~]# setenforce 0
2、安装nfs服务(nfs-utils rpcbind) [[email?protected] ~]# yum -y install nfs-utils [[email?protected] ~]# yum -y install rpcbind 已加载插件:product-id,search-disabled-repos,subscription-manager This system is 3、启动nfs服务 和 rpcbind [[email?protected] ~]# systemctl start nfs-server [[email?protected] ~]# systemctl start rpcbind 4、编辑配置文件的共享目录 1、关闭防火墙(4步 [[email?protected] ~]# systemctl stop firewalld [[email?protected] ~]# systemctl disable firewalld Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service. Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service. [[email?protected] ~]# systemctl disable firewalld [[email?protected] ~]# vim /etc/selinux/ config final/ semanage.conf targeted/ tmp/ [[email?protected] ~]# vim /etc/selinux/ config final/ semanage.conf targeted/ tmp/ [[email?protected] ~]# vim /etc/selinux/ config final/ semanage.conf targeted/ tmp/ [[email?protected] ~]# vim /etc/selinux/config 2、搭建nfs服务 [[email?protected] ~]# yum -y install nfs-utils rpcbind 已加载插件:product-id,subscription-manager 3、启动nfs服务 [[email?protected] ~]# systemctl start nfs-server rpcbind 4、验证nfs服务端的共享目录 [[email?protected] ~]# showmount -e 192.168.50.137 Export list for 192.168.50.137: /add 192.168.50.138 5、创建挂载的目录站点 [[email?protected] ~]# mkdir /nfs 6、挂载 [[email?protected] ~]# mount -t nfs 192.168.50.137:/add /nfs 7、然后在服务端为共享目录设置匿名用户和组 [[email?protected] ~]# chown -R nfsnobody.nfsnobody /add 8、在客户端验证挂载目录站点是否可以创建文件和删除文件 [[email?protected] nfs]# touch 7 8 touch: 无法创建"7": 只读文件系统 touch: 无法创建"8": 只读文件系统 [[email?protected] nfs]# touch 7 8 [[email?protected] nfs]# ls 1 2 3 7 8 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
推荐文章
站长推荐
热点阅读