0
0

More than 3 years have passed since last update.

NFSサーバーの作り方・設定方法

Posted at

はじめに

業務でNFSサーバーを建てる機会があったので作成手順を残します。サーバー側、クライアン側ともにCentOS 7。

構成

# サーバー側
/var/nfs

# クライアント側
/mnt/nfs

SELinuxをオフ

$ vi /etc/selinux/config
SELINUX=enforcing
↓
SELINUX=disabled

$ reboot

サーバー側で行うこと

$ yum install -y nfs-utils
$ vi /etc/exports
/var/nfs 192.168.◯.◯/255.255.255.0(ro)

# 反映と確認
$ exportfs -ra
$ exportfs -v

# ファイアーウォールの設定
$ firewall-cmd --permanent --zone=public --add-service=nfs
$ firewall-cmd --reload

$ systemctl start rpcbind nfs-server

クライアント側で行うこと

$ yum install nfs-utils
$ mount -v -t nfs 192.168.◯.◯:/var/nfs /mnt/nfs

これでいけるはず。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0