Linux实现文件共享

#nfs-utils、rpcbind 软件包来提供 NFS 共享服务

#客户端创建共享文件夹:

nmcli c reload

nmcli c up ens160

systemctl stop firewalld

systemctl disable firewalld

rpm -q nfs-utils rpcbind  #查看是否安装

systemctl enable rpcbind

systemctl enable nfs-server

systemctl enable nfs-lock

systemctl enable nfs-idmap

systemctl start rpcbind

systemctl start nfs-server

systemctl start nfs-lock

systemctl start nfs-idmap

netstat -anup | grep rpc

rpcinfo -p

#创建共享目录

mkdir -p /application/share

chmod 777 /application/share

echo /application/share    192.168.18.*(rw,sync,no_root_squash) > /etc/exports

exportfs -a

showmount -e

#客户机

nmcli c reload

nmcli c up ens33

systemctl stop firewalld

systemctl disable firewalld

rpm -q nfs-utils

systemctl start nfs-server

systemctl enable nfs-server

showmount -e 192.168.18.20

mkdir -p /application/share

cd /application/share

mount -t nfs 192.168.18.20:/application/share /application/share

echo "192.168.18.20:/application/share    /application/share    nfs    defaults    0 0" >> /etc/fstab

mount -a

相关推荐

  1. Linux和Windows文件共享实现方式

    2024-04-25 01:20:02       51 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-25 01:20:02       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-25 01:20:02       106 阅读
  3. 在Django里面运行非项目文件

    2024-04-25 01:20:02       87 阅读
  4. Python语言-面向对象

    2024-04-25 01:20:02       96 阅读

热门阅读

  1. 为什么js无法通过contentDocument获取到iframe内容

    2024-04-25 01:20:02       32 阅读
  2. 2024年湖北专升本C语言模拟试卷

    2024-04-25 01:20:02       34 阅读
  3. K8S CronJob计划任务

    2024-04-25 01:20:02       32 阅读
  4. Docker搭建MinIO私有对象存储

    2024-04-25 01:20:02       33 阅读
  5. 软设之I/O数据传输控制方式

    2024-04-25 01:20:02       32 阅读
  6. VUE之旅—day1

    2024-04-25 01:20:02       28 阅读
  7. Cracking the Data Modeling Interview: Part 1 an Overview

    2024-04-25 01:20:02       34 阅读
  8. matlab2C【g=g1(465:615,200:350);】

    2024-04-25 01:20:02       34 阅读
  9. 力扣练习题(2024/4/21)

    2024-04-25 01:20:02       28 阅读
  10. 关于电脑蓝屏解决方法(ST-LINK/ J-Link)

    2024-04-25 01:20:02       30 阅读
  11. yarn的安装于配置

    2024-04-25 01:20:02       40 阅读
  12. auto关键字的妙用

    2024-04-25 01:20:02       35 阅读