3
3

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 5 years have passed since last update.

AWSでNFS

Posted at

#NFSで共有フォルダ設定

##環境
NFSサーバ
NFSクライアント
共に。
CentOS Linux 6 x86_64 HVM EBS 20150928_0-74e73035-3435-48d6-88e0-89cc02ad83ee-ami-2b35794e.2 (ami-82640282)

SecurityGroupは適宜設定

#NFSサーバ側設定 ※rootで実行

install
yum install portmap nfs-utils nfs-utils-lib
/etc/sysconfig/nfs

# Port rquotad should listen on.
RQUOTAD_PORT=875
...

# TCP port rpc.lockd should listen on.
LOCKD_TCPPORT=32803
# UDP port rpc.lockd should listen on.
LOCKD_UDPPORT=32769

# Port rpc.mountd should listen on.
MOUNTD_PORT=892
...

# Port rpc.statd should listen on.
STATD_PORT=662
/etc/nfsmount.conf
# Server Port
Port=2049
共有ディレクトリを作成
mkdir /opt/share
chmod 0777 /opt/share

/etc/exports
/opt/share *(rw,sync,no_root_squash)
サービス開始
chkconfig iptables off #必要に応じてiptablesの設定変更で対応する
chkconfig rpcbind on
chkconfig nfs on
chkconfig nfslock on

service iptables stop #必要に応じてiptablesの設定変更で対応する
service rpcbind start
service nfs start
service nfslock start

#NFSクライアント側設定 ※rootで実行

install
yum -y install nfs-utils
mkdir /mnt/share
chmod 777 /mnt/share
/etc/fstab
<NFSサーバーのPrivateDNS>:/opt/share   /mnt/share   nfs  defaults 0 0 #追記
サービス開始/mount
chkconfig iptables off #必要に応じてiptablesの設定変更で対応する
chkconfig rpcbind on
chkconfig nfslock on

service iptables stop #必要に応じてiptablesの設定変更で対応する
service rpcbind start
service nfslock start 

mount /mnt/share

########

3
3
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
3
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?