0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

【NFS】amazon linux 2023にNFSを入れてみた

Posted at

概要

amazon linux2023にNFSを入れてみた話を備忘録として記す
尚、今回導入したNFSのバージョンは4を想定している

はじめに

以下インスタンスを作成します

  • EC2 (amazon linux2023)
    ※セキュリティグループやEIPは必要に応じて作成します

NFSの導入 [サーバ側設定]

①nfsをインストールします

$ yum install nfs-utils

②nfsの設定をします

$ vi /etc/exports

③nfsを起動します

$ systemctl start nfs

④nfsが自動起動されるように設定を変更します

$ chkconfig nfs on

⑤nfsの自動起動設定が入っているかを確認します

$ chkconfig --list

⑥クライアント側で参照させたいファイルの権限を変更します

##例
$ chmod 755 /var/log/messages

NFSの導入 [クライアント側設定]

①nfsが存在するか確認します

$ yum search nfs
================================================== Name & Summary Matched: nfs ==================================================
libnfs.x86_64 : Client library for accessing NFS shares over a network
libnfs-devel.x86_64 : Development files for libnfs
libnfs-utils.x86_64 : Utilities for accessing NFS servers
libnfsidmap.x86_64 : NFSv4 User and Group ID Mapping Library
libnfsidmap-devel.x86_64 : Development files for the libnfsidmap library
libstoragemgmt-nfs-plugin.x86_64 : Files for NFS local filesystem support for libstoragemgmt
nfs-stats-utils.x86_64 : NFS utilities for supporting clients
nfs-utils.x86_64 : NFS utilities and supporting clients and daemons for the kernel NFS server
nfs-utils-coreos.x86_64 : Minimal NFS utilities for supporting clients
nfsv4-client-utils.x86_64 : NFSv4 utilities for supporting client
sssd-nfs-idmap.x86_64 : SSSD plug-in for NFSv4 rpc.idmapd
texlive-mfnfss-doc.noarch : Documentation for mfnfss
texlive-nfssext-cfr.noarch : Extensions to the LaTeX NFSS
texlive-nfssext-cfr-doc.noarch : Documentation for nfssext-cfr
texlive-plnfss-doc.noarch : Documentation for plnfss
texlive-psnfss-doc.noarch : Documentation for psnfss
======================================================= Name Matched: nfs =======================================================
texlive-mfnfss.noarch : Packages to typeset oldgerman and pandora fonts in LaTeX
texlive-plnfss.noarch : Font selection for Plain TeX
texlive-psnfss.noarch : Font support for common PostScript fonts
===================================================== Summary Matched: nfs ======================================================
texlive-combofont.noarch : Add NFSS-declarations of combo fonts to LuaLaTeX documents

②nfsv4をインストールします

$ yum install nfsv4-client-utils

③パッケージがインストールされたことを確認します

$ rpm -qa | grep nfs
nfsv4-client-utils-2.5.4-2.rc3.amzn2023.0.3.x86_64

④マウント対象が空かを確認する

$ ls -la /mnt ##今回は/mntへマウントすることを想定しています

⑤手動マウントしてみる

$ mount -t nfs -o nfsvers=4,ro serverのIP:server側のパス /mnt

⑥マウントされたことを確認する

$ df -h

⑦対象が参照できるか確認する

$ ls -la /mnt

参考資料

NFSサーバの設定
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?